ItemsControl.ItemContainerTransitions property

Applies to Windows and Windows Phone

Gets or sets the collection of Transition style elements that apply to the item containers of an ItemsControl.

Syntax


public:
property TransitionCollection^ ItemContainerTransitions { 
   TransitionCollection^ get();
   void set (TransitionCollection^ value);
}


<itemsControl>
  <itemsControl.ItemContainerTransitions>
    <TransitionCollection>
      oneOrMoreTransitions
    </TransitionCollection>
  </itemsControl.ItemContainerTransitions>
</itemsControl>

XAML Values

oneOrMoreTransitions

One or more object elements instantiating types that are derived from the Transition base type. Typically there is only one of each type of transition included in the collection.

Property value

Type: TransitionCollection

The collection of Transition style elements that apply to the item containers of an ItemsControl.

Remarks

Important  The XAML syntax for properties that have a TransitionCollection value is unusual in that you must declare an explicit TransitionCollection object element as the value, and then provide object elements as child elements of TransitionCollection for each of the transition animations you want to use. For most other XAML collection properties you could omit the collection object element because it can be implicit, but TransitionCollection doesn't support the implicit collection usage. For more info on implicit collections and XAML, see Basic XAML syntax guide.

Items collections can have transition animations associated with add or remove actions, or for drop target scenarios.

This property is more typically set in a Style setter rather than inline on an object element in UI definition. For more info, see Quickstart: Styling controls.

The default template for GridView includes existing transition animations. Specifically, the default ItemContainerTransitions value already contains values for AddDeleteThemeTransition, ContentThemeTransition, ReorderThemeTransition and EntranceThemeTransition (with IsStaggeringEnabled="False"). If you are setting a new value for ItemContainerTransitions on GridView, consider reproducing these same theme animations as a starting point.

To remove all default content transitions from a GridView, you might have to re-template the GroupStyle.ContainerStyle. The transition behavior for items and their containers are interrelated.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

ItemsControl
TransitionCollection

 

 

Show:
© 2014 Microsoft