1

I need to create a wrap panel with my facebook friends, meaning the itemcount is over 400, and it takes 5-10 seconds for all the items to load.

   <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <toolkit:WrapPanel/>
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>

This code would be good, but it puts all the elements in 1 Row ...:

    <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
            <VirtualizingStackPanel Orientation="Horizontal"/>
        </ItemsPanelTemplate>
    </ListBox.ItemsPanel>

Any ideas how to add item wraping to VirtualizingStackPanel or how to add Virtualizing to a WrapPanel:

Igor Meszaros
  • 2,081
  • 2
  • 22
  • 46
  • There is a [commercial](http://www.binarymission.co.uk/Products/WPF_SL/virtualizingwrappanel_wpf_sl.htm) version of a VirtualizingWrapPanel available. But I can't vouch for it's quality, since I've never used it. – CodeNaked Nov 02 '11 at 10:47
  • There exists a project which does this. See [this link](http://virtualwrappanel.codeplex.com/). – abhinav Nov 02 '11 at 10:49
  • @CodeNaked Yes I've found that commercial version myself though I would prefer a free version. – Igor Meszaros Nov 02 '11 at 11:26
  • @abhinav I tried that, that is for WPF, and there are lots of exceptions when trying to import to WP7 – Igor Meszaros Nov 02 '11 at 12:00
  • possible duplicate of [WP7 Virtualizing WrapPanel](http://stackoverflow.com/questions/5046810/wp7-virtualizing-wrappanel) – Robert MacLean May 07 '12 at 08:20

2 Answers2

0

Well, the whole point with the WrapPanel is that it adjusts to the size of the content. So it needs to render all items to determind the size.

So you're pretty much out of luck, when it comes to virtualizing that part. However, if it's 400 images you're loading, you could use the LowProfileImageLoader to improve the loading speed drastically.

You can find a mirror of the LowProfileImageLoader source code on my GitHub.

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150
0

I used it by creating a simple listbox, with each element containing a stackpanel with 4 images. cheers

Igor Meszaros
  • 2,081
  • 2
  • 22
  • 46