Reputation: 11
I have a listview which have can say 80+ records and each record have 7 images. When i display whole records then it take too much time and also consuming memory. I want to design wpf control, which display only records which can viewable on the page (suppose to be 6 records with assigned space). Suppose When user clicks on middle part of the scrollbar at position 50 then i have to show record from 45 to 50. please help me by giving any sample tutorial,references or by code.
thanks Ghacho
Upvotes: 1
Views: 517
Reputation: 185225
ListViews and DataGrids are virtualized (create controls only when visible) by default, you just need to use data-binding and data-templating instead of adding all the items manually (and thus forcing their creation).
Upvotes: 1