haosmark
haosmark

Reputation: 1127

How do I NOT animate a list view in XAML?

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

<ListView RelativePanel.Below="pageHeader" ItemsSource="{Binding DataItems}" />

Upvotes: 6

Views: 1615

Answers (2)

Ann Yu
Ann Yu

Reputation: 137

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

this.ListView.ScrollIntoView(ListView.SelectedItem);

Upvotes: 2

Laith
Laith

Reputation: 6091

You have to disable the transitions:

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

Upvotes: 8

Related Questions