Intersoft.Client.UI.Controls Namespace > ContentTransition Class : SetContent Method |
Dim instance As ContentTransition Dim content As Object instance.SetContent(content)
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.
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