次の方法で共有


IXRVisualTransitionCollection (Windows Embedded CE 6.0)

1/6/2010

This class represents a collection of IXRVisualTransition objects that define visual behavior for state transitions for an IXRUserControl object.

Syntax

class IXRVisualTransitionCollection : public IXRCollection<IXRDependencyObject*, IXRDependencyObject*>

Methods

IXRVisualTransitionCollection 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 transitions for an IXRUserControl object:

  1. Use the IXRApplication::CreateObject(IID,Object) method to create an empty IXRVisualTransitionCollection object.
  2. Use CreateObject to create multiple IXRVisualTransition objects that each define the visual appearance for a state of a control.
  3. Add each IXRVisualTransition object to the IXRVisualTransitionCollection collection by calling the inherited method IXRCollection<In_T, Out_T>::Add.
  4. Set the new collection for an IXRVisualStateGroup by calling IXRVisualStateGroup::SetTransitions.

This IXRVisualStateGroup object must belong to an IXRVisualStateGroupCollection. You can create a new collection and add the new IXRVisualStateGroup to it.

To set a new collection of IXRVisualTransition objects for an IXRUserControl object at run time, retrieve the element that is the content of an IXRUserControl. This element can be obtained by calling IXRUserControl::GetContent. Then, call IXRDependencyObject::SetAttachedProperty(const WCHAR*, IXRDependencyObject*) on that element to set the IXRVisualStateGroupCollection as the value of the 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 custom ControlTemplate defined in Microsoft Silverlight 2 XAML cannot be accessed from C++. Therefore, visual transitions that were defined in a ControlTemplate in the source XAML for your application cannot be accessed in Silverlight object tree.

Inheritance Hierarchy

IXRDependencyObject

    IXRCollection<In_T, Out_T>

        IXRVisualTransitionCollection

.NET Framework Equivalent

None.

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

Classes for Collection Management