WPF ListView on portable device - extremely slow scrolling

前端 未结 5 1783
后悔当初
后悔当初 2021-01-16 19:05

I have a GridView in a ListView contained in a ScrollViewer element.

I understand WPF draws only the visible data at runtime, for example on scrolling grids only th

5条回答
  •  春和景丽
    2021-01-16 19:24

    If you need to create elements on load and do not let Virtualizing panel create them as users scrolls through the list, then you should simply set the VirtualizingStackPanel.IsVirtualizing property to false:

    
    
    

    As for DataGrid vs ListView performance. We found rendering time of the first one unacceptable on our project and decided to write our own grid control based on ListView. Performance difference was tremendous: from avg. DataGrid's 300ms we gained ~80ms from ListView...

提交回复
热议问题