0

I need to create the following logic. For example, LongListSelector contains 10 items initially. When user scrolled it to end, another 10 items must be loaded and added to this LongListSelector. Then again, if user reached the end of the list, 10 more items must be added.

I also predict that there might be the following problem. The event of the list's end must be triggered only once, until new 10 items will be loaded. I must prevent multiple triggering and let the new items to be loaded, before new "End of List Event" will be triggered.

So, how to make it? First of all, I need to know, how to detect that the end of the LongListSelector is reached?

splash27
  • 2,057
  • 6
  • 26
  • 49
  • 2
    I think those links: [one](http://stackoverflow.com/q/15341638/2681948), [two](http://blog.slimcode.com/2010/09/11/detect-when-a-listbox-scrolls-to-its-end-wp7/) and [three](http://danielvaughan.org/post/Scroll-Based-Data-Loading-in-Windows-Phone-7.aspx) might help. – Romasz May 30 '14 at 04:54

2 Answers2

0

You can do this by using ManipulationStateChanged event of LongListSelector.Here is Help.

Also, second way is to use ItemRealized event and in its handler you can get last item by doing some manipulation using list.ItemsSource.Count.Here is MSDN sample

Hope this helps.

vITs
  • 1,651
  • 12
  • 30
0

The following blog post on the official blog explains exactly what you want to do: http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/10/01/how-to-create-an-infinite-scrollable-list-with-longlistselector.aspx

Essentially, you handle the LongListSelector.Link event and work upon that.

akshay2000
  • 823
  • 8
  • 28