Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Selecting all items of a xamComboEditor is very slow
posted

I have a situation where I initially want set all the items of a xamComboEditor to selected. The problem is that doing so is very slow. If there are 400 items, it takes 8 seconds, 32 seconds for 800 items, etc. I am using version 2012.1. My code looks very much like:

AllowMultipleSelection = true;
CheckBoxVisibility = System.Windows.Visibility.Visible;
IsEditable = false;

ObservableCollection<string> values = new ObservableCollection<string>();
for (int i = 0; i <= 400; ++i) {
    values.Add(i.ToString());
}
ItemsSource = values;

foreach (ComboEditorItem item in items) {
    item.IsSelected = true;
}

The loop where IsSelected is set to true is taking all the time.

Is there a better way to select all the items? The current slowness is making xamComboEditor unusable for what I want to do.