Problem when using Ctrl+A or Shift + arrows on VirtualizingWrapPanel

2 posts, 0 answers
  1. Benny
    Benny avatar
    1 posts
    Member since:
    Jun 2013

    Posted 02 Jul 2014 Link to this post

    I'm using VirtualizingWrapPanel  inside a Listbox, I have a list of objects as ItemsSource, the list exists all the time but when an object is in the view I retrieve it's image and show it, when an item is not in the view I remove the image, to reduce memory usage.
    1. when I'm selecting object X and using shift + down arrow I see that the list is trying to retrieve all objects from 0 to X even when it is showing only 12 items at that time.
    2. when using Ctrl +A (to select all objects) I don't want the list to retrieve all objects but only the ones that currently on the view.

    Can you please advise what can I do to retrieve only the items that in the view?

  2. Ivan Ivanov
    Ivan Ivanov avatar
    1218 posts

    Posted 07 Jul 2014 Link to this post


    VirtualQueryableCollectionView is designed to provide a number of items for a virtualized ItemsControl, as soon as it requests them. In both of the listed scenarios, ListBox tries to operate with certain items. If this data is not present, VQCV tries to retrieve it. Control over the requested items is handled by the ItemsControl. Trying to interfere with this logic may cause erroneous behavior.

    Ivan Ivanov
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top