コード例 #1
0
        protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
        {
            base.OnPropertyChanged(e);

            if (PropertyItemCollection.IsItemOrderingProperty(e.Property.Name))
            {
                this.RaiseItemOrderingChangedEvent();
            }
        }
コード例 #2
0
        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));
        }
コード例 #3
0
 internal PropertyItem()
 {
     Properties = new PropertyItemCollection(new ObservableCollection <PropertyItem>());
     AddHandler(Mouse.PreviewMouseDownEvent, new MouseButtonEventHandler(PropertyItem_PreviewMouseDown), true);
     AddHandler(PropertyItem.ItemOrderingChangedEvent, new RoutedEventHandler(OnItemOrderingChanged), false);
 }