Intersoft ClientUI Documentation
ContentID Property



Gets or sets the ID of the element to be set as the Content of the control. This property can be used in MVVM design pattern to easily assign the content based on the element's ID.
Syntax
Public Property ContentID As String
Dim instance As ContentTransition
Dim value As String
 
instance.ContentID = value
 
value = instance.ContentID
public string ContentID {get; set;}
public:
property String^ ContentID {
   String^ get();
   void set (    String^ value);
}
Remarks

In addition to setting the content programatically using code (see SetContent), you can also set the new content based on its ID (Name). This technique is ideal for MVVM design pattern which provides a way to set the new content based on a string value without the need to establish a strong reference to the UI element.

To set the content based on an element's ID, you set the ContentID property to the name of the desired element, such as shown in the following example.

XAML
Copy Code
<Grid>

    <Intersoft:ContentTransition StartupTransition="FlipLeft"
                                 ContentID="PhotoImage"/>

    <Image x:Name="PhotoImage" Source="/ClientUIApplication_Docs;component/Assets/Images/dvdunesk.jpg" 
           VerticalAlignment="Center"/>
</Grid>
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