Click here to Skip to main content
15,909,953 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
From MSDN, I found that ListBox uses a VirtualizingStackPanel as the default ItemsPanelTemplate. The default stackpanel is vertical, in my project I need a horizontal one. So, I set the ItemsPanel property:

XML
<ListBox.ItemsPanel>
    <ItemsPanelTemplate>
        <StackPanel Orientation="Horizontal"/>
    </ItemsPanelTemplate>
</ListBox.ItemsPanel>


Yes, it works, but I find the virtualizing feature is disabled. When I bind 10000 items to the ListBox, the UI take 5 seconds to load data. Obviously, it's terrible.

I don't know why. Can someone help? I appreciate very much.
Posted
Updated 11-Dec-10 5:57am
v3
Comments
JF2015 11-Dec-10 8:22am    
Added code formatting.

1 solution

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900