Class PropertyChangedCommand
An undo command that handles a changed property.
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.
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.
Properties
Property
The property that was changed.
public PropertyDescriptor Property { get; }
Property Value
Target
The object the property belongs to.
public object Target { get; }
Property Value
- object
Methods
OnRedo()
Set the changed property value again.
protected override void OnRedo()
OnUndo()
Restore the original property value.
protected override void OnUndo()