IXRVisualStateGroupCollection (Windows Embedded CE 6.0)
1/6/2010
This class represents a collection of IXRVisualStateGroup objects that contain IXRVisualState objects, which define particular visual states, and IXRVisualTransition objects, which are used to go from one state to another.
Syntax
class IXRVisualStateGroupCollection : public IXRCollection<IXRDependencyObject*, IXRDependencyObject*>
Methods
IXRVisualStateGroupCollection inherits the methods from the template class IXRCollection<In_T, Out_T>. It uses In_T parameters of type IXRDependencyObject*, and uses Out_T parameters of type IXRDependencyObject*.
Remarks
Do the following to create a new collection of visual state groups:
- Use the IXRApplication::CreateObject(IID,Object) method to create an empty IXRVisualStateGroupCollection object.
- Use CreateObject to create multiple IXRVisualStateGroup objects that each define the visual appearance for states and state transitions for an IXRUserControl object.
- Add each IXRVisualStateGroup object to the IXRVisualStateGroupCollection collection by calling the inherited method IXRCollection<In_T, Out_T>::Add.
- Set the new collection for an IXRFrameworkElement child element of an IXRUserControl object, retrieved by the method IXRUserControl::GetContent. To do this, call IXRDependencyObject::SetAttachedProperty(const WCHAR*, IXRDependencyObject*) on the child element and set the value for its attached property VisualStateManager.VisualStateGroups.
You can also define this collection in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this collection in the source XAML for your application, see this Microsoft Web site.
Note
The contents of a ControlTemplate defined in Microsoft Silverlight 2 XAML cannot be accessed from C++. Therefore, visual-state groups that were defined in a ControlTemplate in the source XAML for your application cannot be accessed in Silverlight object tree.
Inheritance Hierarchy
IXRVisualStateGroupCollection
.NET Framework Equivalent
None.
Requirements
Header | XamlRuntime.h |
sysgen | SYSGEN_XAML_RUNTIME |
Windows Embedded CE | Windows Embedded CE 6.0 R3 |