Represents a visual behavior that occurs for predefined actions or state changes. Specific theme transitions (various Transition derived classes) can be applied to individual elements using the UIElement.Transitions property, or applied for scenario-specific theme transition properties such as ContentControl.ContentTransitions.
Equivalent WinUI class: Microsoft.UI.Xaml.Media.Animation.Transition.
public ref class Transition : DependencyObject
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)] /// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] /// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] class Transition : DependencyObject
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)] [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)] [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)] public class Transition : DependencyObject
Public Class Transition Inherits DependencyObject
Windows 10 requirements
Windows 10 (introduced in 10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced in v1.0)
Transition derived classes
Transition is the parent class for several immediately derived classes that define library theme transitions. Here are some of the notable derived classes:
For each of these classes, you typically define object elements. Most theme transitions don't have additional attributes, so you typically use a basic self-closing object element, for example
<PopupThemeTransition />. These are used to populate a TransitionCollection property. Those properties include:
Not all transitions make sense for any given property. For example, PopupThemeTransition is really only useful for Popup.ChildTransitions. For more info on how to use the theme transitions, see Animations overview and topics linked from there, including the design guidelines topics.
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.
Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.
Equivalent WinUI property: Microsoft.UI.Xaml.DependencyObject.Dispatcher.(Inherited from DependencyObject)