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 |
|
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
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:
You can find more examples in the sample app.