locked
incremental loading at top and bottom in listview in Universal App

    Question

  • Hi, I am developing universal app. I need to implement incremental loading when listview comes at the bottom also from top.

    When listview comes at bottom and top I am calling webservice. It gives me data according to It. Pagination is done at webservice side so each call of webservice  it gives 50 records each times. In Windows Phone 8.1 SilverLight I can do with This Link . Its works fine in windows phone 8.1 but not in universal app. So How can I use same output in Universal app.

    Thanks.


    shah

    Wednesday, January 28, 2015 5:00 AM

Answers

  • 1) Put the ListView in a ScrollViewer

    2) Listen for ScrollViewer.ViewChanged.

    3) If the VerticalOffset = 0 or the VerticalOffset = size of teh scrollviewer, add more items to the ListView.



    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, January 29, 2015 6:39 PM
    Moderator

All replies

  • If you're asking how to detect compression in a WinRT app, we don't have that yet.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, January 28, 2015 2:24 PM
    Moderator
  • Not same means not want to use compression but I just want to add data when listview comes to Top or Bottom or both. Is there any things or code to do this.?

    shah

    Thursday, January 29, 2015 5:43 AM
  • 1) Put the ListView in a ScrollViewer

    2) Listen for ScrollViewer.ViewChanged.

    3) If the VerticalOffset = 0 or the VerticalOffset = size of teh scrollviewer, add more items to the ListView.



    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, January 29, 2015 6:39 PM
    Moderator