WPF Paged CollectionViewSource
I have a WPF ListBox that I would like to add pagination to as it starts getting slow with a bunch of items. My problem is that I use the Grouping, Sorting, and Filtering. That means if I were to limit the d开发者_开发百科ata with the LINQ Skip() and Take() methods or using something like a paginated ObservableCollection the grouping and sorting would be wrong because it would only be applied to the first page of data. Filtering would be even worse because it would just filter the data displayed in the current display which would mean you would have to be on the page that it would show up on to be able to search for it.
I'm not too keen on the idea of rewriting all of that logic. I see Silverlight 3 is getting a PagedCollectionView (but as far as I can tell WPF in .NET 4 is not getting it). Has anyone implemented something like this before or have any ideas on how I should solve this?
Check out a simple Paginated ObservableCollection I have implemented - works for Silverlight as well as WPF
http://jobijoy.blogspot.com/2008/12/paginated-observablecollection.html
精彩评论