/// <summary> /// Initializes a new instance of the <see cref="PropertyGrid"/> class. /// </summary> public PropertyGrid() { EventManager.RegisterClassHandler(typeof(PropertyGrid), GotFocusEvent, new RoutedEventHandler(ShowDescription), true); // Assign Layout to be Alphabetical by default Layout = new AlphabeticalLayout(); // Wire command bindings InitializeCommandBindings(); #if TRIAL SetTrial(); #endif }
/// <summary> /// Initializes a new instance of the <see cref="PropertyGrid"/> class. /// </summary> public PropertyGrid() { EventManager.RegisterClassHandler(typeof(PropertyGrid), GotFocusEvent, new RoutedEventHandler(ShowDescription), true); var descriptorxX = DependencyPropertyDescriptor.FromProperty(SelectedPropertyProperty, typeof(PropertyGrid)); descriptorxX.AddValueChanged( this, (o, e) => this.SelectedObject = SelectedProperty); // Assign Layout to be Alphabetical by default Layout = new AlphabeticalLayout(); // Wire command bindings InitializeCommandBindings(); #if TRIAL SetTrial(); #endif }
/// <summary> /// Initializes a new instance of the <see cref="PropertyGrid"/> class. /// </summary> public PropertyGrid() { this.GotFocus += (o, e) => { ShowDescription(o, e); }; // Assign Layout to be Alphabetical by default Layout = new AlphabeticalLayout(); // Wire command bindings InitializeCommandBindings(); CurrentDescriptionProperty.Changed.AddClassHandler((Action <PropertyGrid, AvaloniaPropertyChangedEventArgs>)((o, e) => OnCurrentDescriptionChanged(o, e))); LayoutProperty.Changed.AddClassHandler((Action <PropertyGrid, AvaloniaPropertyChangedEventArgs>)((o, e) => OnLayoutChanged(o, e))); ShowReadOnlyPropertiesProperty.Changed.AddClassHandler((Action <PropertyGrid, AvaloniaPropertyChangedEventArgs>)((o, e) => OnShowReadOnlyPropertiesChanged(o, e))); ShowAttachedPropertiesProperty.Changed.AddClassHandler((Action <PropertyGrid, AvaloniaPropertyChangedEventArgs>)((o, e) => OnShowAttachedPropertiesChanged(o, e))); PropertyFilterProperty.Changed.AddClassHandler((Action <PropertyGrid, AvaloniaPropertyChangedEventArgs>)((o, e) => OnPropertyFilterChanged(o, e))); PropertyDisplayModeProperty.Changed.AddClassHandler((Action <PropertyGrid, AvaloniaPropertyChangedEventArgs>)((o, e) => OnPropertyDisplayModePropertyChanged(o, e))); }