Exemple #1
0
 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;
 }
Exemple #2
0
 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;
 }