WPF listview / gridview metric awful suggestions

I have a window using WPF ListView / GridView associated with an ObservableCollection. The performance is absolutely terrible. The application suffocates, trying to load 300-400 elements and bursts of processor usage every time an element is added / removed / changed. Profiling does not show anything obvious.

Anyone have any suggestions?

+6
performance listview wpf gridview
source share
6 answers

Check these properties:

VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling" ScrollViewer.IsDeferredScrollingEnabled="True" 
+7
source share

You need to virtualize the ListView ItemSource, as described in this article: WPF: Data Virtualization on CodeProject Paul McClain

+5
source share

Suppose you use complex data patterns for each ListViewItem? It can be anything from a multitude of images to (old) BitmapEffects to even lazy loadable properties that retrieve data on demand from the database (which can cause you to make many db calls to render each image, depending on how is your work data model).

Secondly, the list itself is able to quickly launch its load / add / modify / delete operations (which means that the problem occurs when data is visualized), or the list itself performs these tasks slowly (indicating that the list has some kind of problem).

+2
source share

Have you tried virtualization as recommended in this question ??

WPF ListView Very Slow Performance - Why? (ElementHost or another reason?)

+1
source share

And the obvious one, make sure you upgrade to .net 3.5 SP1, there were many performance advantages.

It might also be worth looking at the WPAT datagridview control, since most of the performance in .net 3.5 SP1 was such that the datagridview would have good performance on large datasets.

http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25047

+1
source share

I had similar problems. MaxHeight to a MaxHeight value exceeding the actual height of the ListView solved this instantly, thanks to this answer here , but I still don't understand how it works.

0
source share

All Articles