static void OnFilterChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { TypePresenter ctrl = (TypePresenter)sender; if (null != ctrl.PropertyChanged) { ctrl.PropertyChanged(ctrl, new PropertyChangedEventArgs("Items")); } }
static void OnTypeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { TypePresenter ctrl = (TypePresenter)sender; ctrl.lastSelection = (Type)args.NewValue; if (null != ctrl.PropertyChanged) { ctrl.PropertyChanged(ctrl, new PropertyChangedEventArgs("TypeName")); } if (null == ctrl.lastSelection) { ctrl.typeComboBox.SelectedIndex = ctrl.typeComboBox.Items.IndexOf(ctrl.NullTypeWrapper); } ctrl.Text = ctrl.TypeName; ctrl.RaiseEvent(new RoutedEventArgs(TypePresenter.TypeChangedEvent, ctrl)); }