private void AddComponentButton_Click(object sender, RoutedEventArgs e) { addComponentList.SelectedItem = null; addComponentsListPopup.IsOpen = true; AddComponentsFilter.Focus(); addComponentList.ItemsSource = Component.GetAllAddableComponentTypes(); CollectionViewSource.GetDefaultView(addComponentList.ItemsSource).Filter = ComponentsFilter; }
private void AddComponent(object sender, ExecutedRoutedEventArgs e) { addComponentList.SelectedItem = null; addComponentsListPopup.IsOpen = true; AddComponentsFilter.Focus(); addComponentList.ItemsSource = Component.GetAllAddableComponentTypes(); CollectionViewSource.GetDefaultView(addComponentList.ItemsSource).Filter = ComponentsFilter; //selectedComponent = 0; //addComponentList.SelectedIndex = selectedComponent; }