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