views:

30

answers:

1

Hi,

I have a listbox which has a datatemplate applied to the items. Each item id to display 3 text fields. The listbox is bound to an observablecollection. Everything is working fine, but when i try to load more than ~100 items into the collection, it starts chewing up all my CPU and takes ages to load.

Any suggestions?

A: 

try using VirtualizingStackPanel

Please refer this document may that can help you http://blogs.msdn.com/b/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx

Kishore Kumar
ListBox already has the VirtualizingStackPanel. Its IsVirtualizing is also set to true by default. However the VirtualizationMode could be set to Recycling to reuse items. But wonder if that could be the problem for loading just 100+ items.
Veer