AddDeleteThemeTransition AddDeleteThemeTransition AddDeleteThemeTransition AddDeleteThemeTransition Class


Provides the animated transition behavior for when controls add or delete children of a panel. For example, if you have a collection of photos displayed in a Grid, you can associate this animation to the Grid so that when photos are added or deleted, the photos will animate in and out of view.

public : sealed class AddDeleteThemeTransition : Transition, IAddDeleteThemeTransitionpublic sealed class AddDeleteThemeTransition : Transition, IAddDeleteThemeTransitionPublic NotInheritable Class AddDeleteThemeTransition Inherits Transition Implements IAddDeleteThemeTransition// This API is not available in Javascript.
<AddDeleteThemeTransition .../>
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Inherited properties


The following example shows how to use the AddDeleteThemeTransition to animate rectangles as they are added and deleted from a panel. Notice how the other child elements of the panel re-flow when one of them is removed.

<Button Content="Add Rectangle" Click="AddButton_Click"/>
<Button Content="Remove Rectangle" Click="RemoveButton_Click"/>

<ItemsControl Grid.Row="1" x:Name="rectangleItems">

            <!-- You use AddDeleteThemeTransition 
                 in panels like in a WrapGrid. -->
            <WrapGrid Height="400"/>

private void RemoveButton_Click(object sender, RoutedEventArgs e)
    if (rectangleItems.Items.Count > 0)

private void AddButton_Click(object sender, RoutedEventArgs e)
    Color rectColor = new Color();
    rectColor.R = 200;
    rectColor.A = 250;
    Rectangle myRectangle = new Rectangle();
    myRectangle.Fill = new SolidColorBrush(rectColor);
    myRectangle.Width = 100;
    myRectangle.Height = 100;
    myRectangle.Margin = new Thickness(10);



AddDeleteThemeTransition() AddDeleteThemeTransition() AddDeleteThemeTransition() AddDeleteThemeTransition()

Initializes a new instance of the AddDeleteThemeTransition class.

public : AddDeleteThemeTransition()public AddDeleteThemeTransition()Public Sub New()// This API is not available in Javascript.
See Also

See Also