How to remove ListView's add item animation?
animation, listview, windows-runtime
Solution
These animations are called transitions and they are part of `ListViewStyle`. To change it right click on `ListView` control in the designer and select `Edit Template` > `Edit a Copy...`. This will add the built-in style to your XAML.
The following part of the style is of interest to you:
<Setter Property="ItemContainerTransitions">
<Setter.Value>
<TransitionCollection>
<AddDeleteThemeTransition/>
<ContentThemeTransition/>
<ReorderThemeTransition/>
<EntranceThemeTransition IsStaggeringEnabled="False"/>
</TransitionCollection>
</Setter.Value>
</Setter>
I'm not sure which animation exactly you dislike but try removing `AddDeleteThemeTransition` and/or `EntranceThemeTransition` from `TransitionCollection`. It should do the trick.
Don't forget to make sure the modified style is applied to the desired `ListView`.
Problem
I have a `ListView` and I edited its `ItemContainerStyle` to modify some style but I don't know how to remove that annoying animation when you add an item. With an `ItemsControl`, when you add a new item, it appears instantly, without any animation. With `ListView`, the item takes a while and then, it starts an animation to show up. I just want to remove that `add animation` and when I click on `Add item` it appears instantly, no extra stuff. I think that it should belong to `ItemContainerStyle` but even I commented out all visualstate animations and is still there. I'm missing something out.