Table of Contents

Class PropertyChangedCommand

Namespace
NanoByte.Common.Undo
Assembly
NanoByte.Common.WinForms.dll

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 object

The object the property belongs to.

property PropertyDescriptor

The property that was changed.

oldValue object

The property's old value.

newValue object

The property's current value.

PropertyChangedCommand(object, PropertyValueChangedEventArgs)

Initializes the command after the property was first changed.

public PropertyChangedCommand(object target, PropertyValueChangedEventArgs e)

Parameters

target object

The object the SelectedObject is target at.

e PropertyValueChangedEventArgs

The 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()