Pagination with LongListSelector in windows phone 8

1k views Asked by At

In my windows phone 8 application, I've used Long List Selector. When the user clicks on the show button in Main Page, I'm getting the result from the server and setting those results to Long List Selector, which is in Results Page. Up to this, everything is fine.

 pageNumber = 1;
 noOfResultsPerPage = 15;

Now, I want to add next 15 records to the Long List Selector when the user reaches to the last item. How should I know whether user scrolled to the last item in the list or not? So that we can send the request to the server and get the records from the server and add to the list.

Thanks

2

There are 2 answers

2
Julien On BEST ANSWER

You need to subscribe to ItemRealized event (this event is raised each time an item is rendered on the screen) So when the ItemRealized is raised you have to check the index of the iteam realized and then execute your method

0
Justice On

If i'm right you want to implement incremental loading in the longlistselector, then you can use the itemrealized event of longlistseletor, there is a very nice sample which i would suggest you to have a look