Table of Contents

Class PropertyChangedCommand

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

An undo command that handles a changed property.

public class PropertyChangedCommand : PreExecutedCommand, IUndoCommand
Inheritance
object
PropertyChangedCommand
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

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.

Properties

Property

The property that was changed.

public PropertyDescriptor Property { get; }

Property Value

PropertyDescriptor

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