How not to animate a list view in XAML?

This applies to UWP, how can I turn off the animation of list items? I have a method that runs every few seconds, and the fly-in animation effect makes it visually unpleasant. I want to turn off the effect. Not much code to share, but here is my ListView:

<ListView RelativePanel.Below="pageHeader" ItemsSource="{Binding DataItems}" />
+4
source share
2 answers

You need to disable the transitions:

<ListView Transitions="{x:Null}"
          ItemContainerTransitions="{x:Null}">
</ListView>
+5
source

If you want to set the scroll position, try the following:

this.ListView.ScrollIntoView(ListView.SelectedItem);
+2
source

Source: https://habr.com/ru/post/1675108/


All Articles