Question

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:

Was it helpful?

Solution 2

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top