Robert Jeppesen
Robert Jeppesen

Reputation: 7877

WPF Data virtualizing ListView

In our current WinForms app, we are displaying millions of records in ListView, using virtualization. Rows are loaded from DB as they are requested. This works well, with good performance.

This is a showstopper for migrating to WPF for us. We need data virtualization in a ListView, like WinForms 2.0 has.

Do you know a decent third-party control, or a relatively easy way of doing it with built-in controls? It doesn't need to be a DataGrid, a simple ListView will suffice.

Note, I'm note talking about UI virtualization, it's data virtualization.

Upvotes: 15

Views: 26082

Answers (4)

Just add following properties in your listview declaration in XAML.

<ListView 
      VirtualizingPanel.IsVirtualizing="True"
      VirtualizingPanel.IsVirtualizingWhenGrouping="True"
      VirtualizingPanel.VirtualizationMode="Recycling"
      ScrollViewer.IsDeferredScrollingEnabled="True" >
</ListView>

Upvotes: -1

Martin Konicek
Martin Konicek

Reputation: 40924

The article WPF Data Virtualization should be exactly what you are looking for, I just implemented it quite easily, and it works.

Upvotes: 14

Dahdahm
Dahdahm

Reputation: 513

This is the description for the Ultimate ListBox for WPF from Xceed:

Intelligent virtualized background data retrieval:

Automatic data retrieval only gets records from the remote data source if they are visible (data virtualization). This greatly reduces the amount of data to be transferred, which increases the perceived speed of the listbox. Also reduces strain on the server.

Upvotes: 1

Samuel Jack
Samuel Jack

Reputation: 33270

Xceed DataGrid for WPF has data virtualization support.

Upvotes: 2

Related Questions