Intersoft ClientUI Documentation
ContentID Property
See Also  Send Feedback
Intersoft.Client.UI.Controls Namespace > ContentTransition Class : 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

Visual Basic (Declaration) 
Public Property ContentID As String
Visual Basic (Usage)Copy Code
Dim instance As ContentTransition
Dim value As String
 
instance.ContentID = value
 
value = instance.ContentID
C# 
public string ContentID {get; set;}
Delphi 
public read-write property ContentID: String; 
JScript 
public function get,set ContentID : String
Managed Extensions for C++ 
public: __property string* get_ContentID();
public: __property void set_ContentID( 
   string* value
);
C++/CLI 
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 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.