ContentControl.ContentTransitions Property

Definition

Gets or sets the collection of Transition style elements that apply to the content of a ContentControl.

C#
public TransitionCollection ContentTransitions { get; set; }
XAML
<contentControl>
  <contentControl.ContentTransitions>
    <TransitionCollection>
      oneOrMoreTransitions
    </TransitionCollection>
  </contentControl.ContentTransitions>
</contentControl>

Property Value

The strongly typed collection of Transition style elements.

Remarks

Note

Prior to Windows 10, version 1809 (SDK 17763), the XAML syntax for properties that have a TransitionCollection value requires that you 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. In Windows 10, version 1809 (SDK 17763) or later, TransitionCollection supports the implicit collection usage, so you can omit the collection object element. For more info on implicit collections and XAML, see XAML syntax guide.

Transition animations play a particular role in UI design of your app. The basic idea is that when there is a change or transition, the animation draws the attention of the user to the change.

It's not common to set the value of the ContentTransitions property directly on a ContentControl type that is a direct element of app UI. It's more common to have a transitions collection be a part of a visual state, template or style. In this case you use mechanisms such as Setter of a Style to specify the ContentTransitionsproperty. Styles are typically stored as a XAML resource.

Applies to

Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100