locked
Maximum height of scrollviewer or maximum elements in ListView RRS feed

  • Question

  • Hi

    I have a ListView in my APP which shows the search result of query, and I have used scrollviewer to scroll between elements of ListView. If search result contains 499 results then it shows okay but if result is greater than 499 then at loading time APP get crashes. Is this a problem of scrollviewer height or ListView's maximum limit of elements. What is the maximum height of scrollviewer and the maximum limit of ListView?. Is anyone faced such an issue, Please provide the solution.

    Thanks in advance,

    Regards,

    Rishi

    Monday, January 21, 2013 1:05 PM

Answers

  • hey rishi,

    it might be related to memory usage and hardware issue... considering the number of elements you are displaying, you might want to give it a shot with Virtualization. You can use a VirtualizingStackPanel as the ItemsPanelTemplate (default is StackPanel), and let the listview deal with the scrolling rather than wrapping it up with another scrollviewer. (listview already has a scrollviewer in its template).

    hope it helps.


    Can Bilgin
    Blog Samples CompuSight

    • Marked as answer by RishiRajIT Tuesday, January 22, 2013 4:14 AM
    Monday, January 21, 2013 3:47 PM

All replies

  • hey rishi,

    it might be related to memory usage and hardware issue... considering the number of elements you are displaying, you might want to give it a shot with Virtualization. You can use a VirtualizingStackPanel as the ItemsPanelTemplate (default is StackPanel), and let the listview deal with the scrolling rather than wrapping it up with another scrollviewer. (listview already has a scrollviewer in its template).

    hope it helps.


    Can Bilgin
    Blog Samples CompuSight

    • Marked as answer by RishiRajIT Tuesday, January 22, 2013 4:14 AM
    Monday, January 21, 2013 3:47 PM
  • Thanks Can Bilgin

    as per your solution I just removed the scrollviewer and it worked fine.

    Tuesday, January 22, 2013 4:14 AM