TwitterSearch - Windows Phone 8 LongListSelector Infinite Scrolling Sample

This sample demonstrates how to use Windows Phone 8.0 SDK's LongListSelector control to display Twitter search results as items in a long list and to load more items as the user approaches towards the end of list to simulate infinite scrolling.

C# (417.3 KB)
 
 
 
 
 
4 Star
(6)
13,101 times
Add to favorites
11/29/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Error Message
    1 Posts | Last post September 04, 2013
    • I'm experiencing a bit of difficulty running the app on my phone. The exception is handled and displayed as "The remote server returned an error: NotFound". I don't know if it's my implementation of the solution or if it has to do with the newly added Twitter API.
  • Update of Twitter
    1 Posts | Last post August 13, 2013
    • This sample use the API 1.0 of twitter.
      Since the 11 july 2013, this API has been remove instead of API 1.1.
      
      You have to change the variable SEARCH_URI.
      Or may be Microsoft could make an update ?
  • ItemRealized fires always when adding item.
    1 Posts | Last post August 01, 2013
    • I use this technique in my code and dont get functionality of infinite scroll. When i add new items ItemRealized fires and load new page, until all list not load. I uses with differents itemtemplates which have absolut size, template from this example - everything is useless :(
  • The app no longer works
    1 Posts | Last post June 26, 2013
    • The twitter ATOM output format has been retired (along with RSS and XML). Apparently the only output format supported, as of June 11th, is JSON...
  • Code clarification
    2 Posts | Last post November 29, 2012
    •         <phone:LongListSelector Name="resultListBox" Grid.Row="1"
                       DataContext="{StaticResource viewModel}"
                       ItemTemplate="{StaticResource ResultItemTemplate}"                 
                       ItemsSource="{Binding TwitterCollection}"                               
                       ListFooter="{Binding}" ItemRealized="resultListBox_ItemRealized"/>
    • same as above. Let me know if that clarifies your question. Thanks!
  • Where is the XAML is the reference to resultListBox_ItemRealized
    2 Posts | Last post November 29, 2012
    • I see this method.  But I'm not sure how it gets called.
       void resultListBox_ItemRealized(object sender, ItemRealizationEventArgs e)
      
      I'm trying to use this event in my code but if I put a reference in the XAML like this:
      
              <phone:LongListSelector Name="resultListBox" Grid.Row="1"
                       DataContext="{StaticResource viewModel}"
                       ItemTemplate="{StaticResource ResultItemTemplate}"                 
                       ItemsSource="{Binding TwitterCollection}"                               
                       ListFooter="{Binding} ItemRealized="resultListBox_ItemRealized"/>
      
      When I run it then I get a XAML parsing error.  So I can't seem to figure out how to match the XAML to the code.
      
    • the ItemRealized event is hooked up to the eventhandler in the code behind's constructor.
      
      resultListBox.ItemRealized += resultListBox_ItemRealized; 
      
      hook up the event handler in only one location, either in XAML or code-behind.