Reorder​Theme​Transition Reorder​Theme​Transition Reorder​Theme​Transition Class

Definition

Provides the animated transition behavior for when list-view controls items change order. Typically this is due to a drag-drop operation. Different controls and themes potentially have varying characteristics for the animations involved.

public : sealed class ReorderThemeTransition : Transition, IReorderThemeTransitionpublic sealed class ReorderThemeTransition : Transition, IReorderThemeTransitionPublic NotInheritable Class ReorderThemeTransition Inherits Transition Implements IReorderThemeTransition
<ReorderThemeTransition .../>
Inheritance
ReorderThemeTransitionReorderThemeTransitionReorderThemeTransition
Attributes
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

Examples

The following example applies a ReorderThemeAnimation to a set of rectangles. As the new rectangles are added to the set, the other rectangles animate around the new one.


<StackPanel>
    <Button x:Name="AddItemButton" Content="AddItem" Click="AddItemButton_Click"/>
    <ItemsControl x:Name="ItemsList">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <WrapGrid>
                    <WrapGrid.ChildrenTransitions>
<!-- Apply a ReorderThemeTransition that will run when child elements are reordered. -->
                        <TransitionCollection>
                            <ReorderThemeTransition/>
                        </TransitionCollection>
                    </WrapGrid.ChildrenTransitions>
                </WrapGrid>
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
        <!-- Initial items. -->
        <Rectangle Width="100" Height="100" Fill="Red"/>
        <Rectangle Width="100" Height="100" Fill="Green"/>
        <Rectangle Width="100" Height="100" Fill="Blue"/>            
    </ItemsControl>            
</StackPanel>
private void AddItemButton_Click(object sender, RoutedEventArgs e)
{
    Rectangle newItem = new Rectangle();
    Random rand = new Random();

    newItem.Height = 100;
    newItem.Width = 100;
    newItem.Fill = new SolidColorBrush(Color.FromArgb(255,
            (byte)rand.Next(0, 255), (byte)rand.Next(0, 255), (byte)rand.Next(0, 255)));

    // Insert a new Rectangle of a random color into the ItemsControl at index 2.
    ItemsList.Items.Insert(2, newItem);
}
void DocsCPP::MainPage::AddItemButton_Click(Object^ sender,RoutedEventArgs^ e)
{
    Rectangle^ newItem = ref new Rectangle();

    newItem->Height = 100;
    newItem->Width = 100;

    Color color;
    color.R = rand() % 256;
    color.G = rand() % 256;
    color.B = rand() % 256;

    newItem->Fill = ref new SolidColorBrush(color);

    // Insert a new Rectangle of a random color into the ItemsControl at index 2.
    ItemsList->Items->InsertAt(2, newItem);
}

Remarks

Note that setting the Duration property has no effect on this object since the duration is preconfigured.

Constructors

ReorderThemeTransition() ReorderThemeTransition() ReorderThemeTransition()

Initializes a new instance of the ReorderThemeTransition class.

public : ReorderThemeTransition()public ReorderThemeTransition()Public Sub New()
Attributes

See Also