Class PropertyChangedCommand
An undo command that handles a changed property - usually used with a System.Windows.Forms.PropertyGrid.
public class PropertyChangedCommand : PreExecutedCommand, IUndoCommand
- Inheritance
-
objectPropertyChangedCommand
- Implements
- Inherited Members
- Extension Methods
Constructors
PropertyChangedCommand(object, PropertyDescriptor, object?, object?)
An undo command that handles a changed property - usually used with a System.Windows.Forms.PropertyGrid.
public PropertyChangedCommand(object target, PropertyDescriptor property, object? oldValue, object? newValue)
Parameters
targetobjectThe object the property belongs to.
propertyPropertyDescriptorThe property that was changed.
oldValueobjectThe property's old value.
newValueobjectThe property's current value.
PropertyChangedCommand(object, PropertyValueChangedEventArgs)
Initializes the command after the property was first changed.
public PropertyChangedCommand(object target, PropertyValueChangedEventArgs e)
Parameters
targetobjectThe object the System.Windows.Forms.PropertyGrid.SelectedObject is target at.
ePropertyValueChangedEventArgsThe event data from the System.Windows.Forms.PropertyGrid.PropertyValueChanged.
Methods
OnRedo()
Set the changed property value again.
protected override void OnRedo()
OnUndo()
Restore the original property value.
protected override void OnUndo()