protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) { base.OnPropertyChanged(e); if (PropertyItemCollection.IsItemOrderingProperty(e.Property.Name)) { this.RaiseItemOrderingChangedEvent(); } }
public PropertyGrid() { _properties = new PropertyItemCollection(new ObservableCollection <PropertyItem>()); EditorDefinitions = new EditorDefinitionCollection(); PropertyDefinitions = new PropertyDefinitionCollection(); AddHandler(PropertyItem.ItemSelectionChangedEvent, new RoutedEventHandler(OnItemSelectionChanged)); AddHandler(PropertyItem.ItemOrderingChangedEvent, new RoutedEventHandler(OnItemOrderingChanged)); CommandBindings.Add(new CommandBinding(PropertyGridCommands.ClearFilter, ClearFilter, CanClearFilter)); }
internal PropertyItem() { Properties = new PropertyItemCollection(new ObservableCollection <PropertyItem>()); AddHandler(Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(PropertyItem_PreviewMouseDown), true); AddHandler(PropertyItem.ItemOrderingChangedEvent, new RoutedEventHandler(OnItemOrderingChanged), false); }