問題描述
WPF數據虛擬化ListView (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.
‑‑‑‑‑
參考解法
方法 1:
The article WPF Data Virtualization should be exactly what you are looking for, I just implemented it quite easily, and it works.
方法 2:
Xceed DataGrid for WPF has data virtualization support.
方法 3:
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.
(by Robert Jeppesen、Martin Konicek、Samuel Jack、Dahdahm)