Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.73 KB

ItemsReorderAnimation.md

File metadata and controls

41 lines (28 loc) · 1.73 KB
title author description keywords dev_langs
ItemsReorderAnimation
nmetulev
Provides the ability to assign a reorder animation to a items in any ListViewBase container.
windows 10, uwp, windows community toolkit, uwp community toolkit, uwp toolkit, ItemsReorderAnimation
csharp

ItemsReorderAnimation

The ItemsReorderAnimation type allows your ListViewBase controls (such as ListView and GridView) to animate items into position when the size of the container changes.

Platform APIs: ItemsReorderAnimation

Syntax

The ItemsReorderAnimation type can be used directly from XAML like other attached properties:

<Page ...
    xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"/>
<GridView x:Name="MyGridView"
          animations:ItemsReorderAnimation.Duration="0:0:0.2"/>

This will add an animation with a duration of 200ms to all items in the target GridView control.

The ItemsReorderAnimation type can also be used directly from code behind, if necessary:

ItemsReorderAnimation.SetValue(MyGridView, TimeSpan.FromMilliseconds(200));

Here is the visual result when using a GridView to display some images in a window being resized:

ItemsReorderAnimation

Examples

You can find more examples in the sample app.