Paging a Listbox control in WPF

2.4k views Asked by At

I have a WPF ListBox with it's ItemSource property bound to an ObservableCollection. Each ListBox Item has many controls that could take some time to load up.

I would like to only display/load 5 ListBox items at a time, with some paging support or a "Next" button or something similar.

Currently I plan to do this manually and just keep two different collections. One would be the master collection with all the objects, and other would be the ListBox's collection where i would just remove 5, and put in a new 5 objects. I was just curious if there is something built in that would make my job a bit easier in this situation, i'm very new to WPF and all the binding techniques, and I have a habit of doing everything the old fashion and manual way, but I'd like to start using some of the newer 'quicker' techniques.

Thanks

1

There are 1 answers

0
Kishore Kumar On

just look into Bag of Tricks by Kevin

https://github.com/thinkpixellab/bot

you can see the page list viewer.... in the examples...