Silverlight combobox performance issue
Posted
by Vinzz
on Stack Overflow
See other posts from Stack Overflow
or by Vinzz
Published on 2010-06-08T14:08:37Z
Indexed on
2010/06/08
14:12 UTC
Read the original article
Hit count: 504
Silverlight
|Performance
Hi,
I'm facing a performance issue with a crowded combobox (5000 items). Rendering of the drop down list is really slow (as if it was computing all items before showing any).
Do you have any trick to make this dropdown display lazy?
Xaml code:
<Grid x:Name="LayoutRoot">
<StackPanel Orientation="Horizontal" Width="200" Height="20">
<TextBlock>Test Combo </TextBlock>
<ComboBox x:Name="fooCombo" Margin="5,0,0,0"></ComboBox>
</StackPanel>
</Grid>
code behind:
public MainPage() { InitializeComponent();
List<string> li = new List<string>();
int Max = 5000;
for (int i = 0; i < Max; ++i)
li.Add("Item - " + i);
fooCombo.ItemsSource = li;
}
© Stack Overflow or respective owner