I have implemented the virtualized ListView
from WPF Data virtualizing ListView. This works terrificly, but for the automatic resizing of the column widths. What happens is that the columns resize on the first retrieved result set (specifically the visible rows after the first load), but when new data comes in that is wider then the contents of the first page, the columns do not grow anymore.
I have tried auto resizing (setting the width to ActualWidth
and then back to NaN
) on every scroll, but this gives performance problems, and it shrinks the columns when the visible data is smaller than the current column width.
How can I make the columns automatically grow when new data comes in?