EntranceThemeTransition Class


Provides the animated transition behavior on controls when they first appear. You can use this on individual objects or on containers of objects. In the latter case, child elements will animate into view in sequence rather than all at the same time.

public ref class EntranceThemeTransition sealed : Transition
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Static(Microsoft.UI.Xaml.Media.Animation.IEntranceThemeTransitionStatics, 65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.WebHostHidden]
class EntranceThemeTransition final : Transition
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.Static(typeof(Microsoft.UI.Xaml.Media.Animation.IEntranceThemeTransitionStatics), 65536, "Microsoft.UI.Xaml.WinUIContract")]
public sealed class EntranceThemeTransition : Transition
Public NotInheritable Class EntranceThemeTransition
Inherits Transition
<EntranceThemeTransition .../>
Windows.Foundation.Metadata.ActivatableAttribute Windows.Foundation.Metadata.ContractVersionAttribute Windows.Foundation.Metadata.MarshalingBehaviorAttribute Windows.Foundation.Metadata.StaticAttribute Windows.Foundation.Metadata.ThreadingAttribute Windows.Foundation.Metadata.WebHostHiddenAttribute


This example shows a how to apply an EntranceThemeTransition to a Button.

<Button Content="EntranceThemeTransition Button">
            <!-- This transition just uses the default behavior which is to
                 have the button animate into view from the right. You can
                 make it start from anywhere on the right by using the
                 FromHorizontalOffset property. If you'd rather see a vertical
                 animation, use the FromVerticalOffset property. -->
            <EntranceThemeTransition />

Here, the EntranceThemeTransition is applied using a Style resource.

<Grid Background="{StaticResource ApplicationPageBackgroundBrush}">
        <Style x:Key="DefaultButtonStyle" TargetType="Button">
            <Setter Property="Transitions">

    <Button Style="{StaticResource DefaultButtonStyle}" 
            Content="EntranceThemeTransition style applied" />


If you set an EntranceThemeTransition animation on a panel, the children of the panel will automatically offset when they animate into view to create a visually appealing entrance.

Here, as rectangles are added to the StackPanel, they fly in from the upper right, rather than just appearing in place.

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Button Content="Add rectangle" Click="Button_Click"/>

    <StackPanel x:Name="panel1" HorizontalAlignment="Left" Margin="200">
private void Button_Click(object sender, RoutedEventArgs e)
    // Add a rectangle to the StackPanel.
    Rectangle r = new Rectangle();
    r.Width = 100;
    r.Height = 100;

    // Alternate colors as rectangles are added.
    if (panel1.Children.Count % 2 == 0)
        r.Fill = new SolidColorBrush(Colors.Green);
        r.Fill = new SolidColorBrush(Colors.Yellow);



Initializes a new instance of the EntranceThemeTransition class.



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.

(Inherited from DependencyObject)

Gets the DispatcherQueue that this object is associated with. The DispatcherQueue represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)

Gets or sets the distance by which the target is translated in the horizontal direction when the animation is active.


Identifies the FromHorizontalOffset dependency property.


Gets or sets the distance by which the target is translated in the vertical direction when the animation is active.


Identifies the FromVerticalOffset dependency property.


Gets or sets a value that determines whether the transition staggers rendering of multiple items, or renders all items at once.


Identifies the IsStaggeringEnabled dependency property.



Clears the local value of a dependency property.

(Inherited from DependencyObject)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
SetValue(DependencyProperty, Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

Applies to

See also