Intersoft ClientUI Documentation
SetContent Method
See Also  Send Feedback
Intersoft.Client.UI.Controls Namespace > ContentTransition Class : SetContent Method






content
The content to be set.
Sets the given object as the content for the control.

Syntax

Visual Basic (Declaration) 
Public Sub SetContent( _
   ByVal content As Object _
) 
Visual Basic (Usage)Copy Code
Dim instance As ContentTransition
Dim content As Object
 
instance.SetContent(content)
C# 
public void SetContent( 
   object content
)
Delphi 
public procedure SetContent( 
    content: TObject
); 
JScript 
public function SetContent( 
   content : Object
);
Managed Extensions for C++ 
public: void SetContent( 
   Object* content
) 
C++/CLI 
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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.