Alek Arsovski
Alek Arsovski

Reputation: 349

Load more items on grid view scroll end

I am developing a Windows Store Application in XAML/C# and I have a GridView displaying 12 items at a time (3 x 4). What I need to do is once the user scrolls to the end, more items are added to the GridView. How do I catch the event for scrolling at end?? I tried many approaches, but nothing worked...

UPDATE: It took me a LOOOONG time and lots of examples to figure what I was doing wrong. ListView worked, but GridView didn't... Finally I noticed that the GridView items must have a width height in order for incremental loading to work.

Upvotes: 4

Views: 9443

Answers (2)

chue x
chue x

Reputation: 18803

I would suggest that you bind your GridView to a collection that implements the ISupportIncrementalLoading interface. If you do this, the GridView can automatically load the data when the user scrolls to the end.

For a complete example on how to do this, see Microsoft's XAML data binding sample.

Upvotes: 1

Related Questions