Intersoft ClientUI Documentation
SetContent Method (ContentTransition)



The content to be set.
Sets the given object as the content for the control.
Syntax
Public Sub SetContent( _
   ByVal content As Object _
) 
Dim instance As ContentTransition
Dim content As Object
 
instance.SetContent(content)
public void SetContent( 
   object content
)
public:
void SetContent( 
   Object^ content
) 

Parameters

content
The content to be set.
Remarks

You use the SetContent method to set the content programmatically using code, such as shown in the following example.

C#
Copy Code
private void UXButton_Click(object sender, RoutedEventArgs e)
{
    Image image = new Image();
    image.Source = new BitmapImage(
            new Uri("/ClientUIApplication_Docs;component/Assets/Images/ClientUIBg.jpg", UriKind.RelativeOrAbsolute));

    contentTransition1.SetContent(image);
}

Although you can set a new content through the Content property, using the SetContent method has several advantages over the Content property. For example, using SetContent method automatically removes the target element from its parent element and makes the target element visible if it was previously collapsed.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ContentTransition Class
ContentTransition Members

Send Feedback