PropertyAction

ObjectActionAction
[IoId("00000000-a35f-4afb-bb7a-9acc7e91e053")] [UiName("Custom Property")] public sealed class PropertyAction : ObjectAction
An undo action for setting and unsetting simple properties or fields on objects. Here, 'simple' means some of the primitives (bool, int, float, double, string), some of the eto core types (Color, Size, SizeF, Point, PointF, Rectangle, RectangleF), and anything which implements IStorable. Furthermore any property which is an enum will be stored and restored using 32-bit integer values.

Constructors

PropertyAction

#
public PropertyAction(
obj,
property,
response = Effects.ExpireSolution,
autoExtend = true
)

PropertyAction

#
public PropertyAction(
reader
)

Properties

AutoExtend

#
Gets whether consecutive instances of this undo action extend each other.
public bool AutoExtend { get; }

Id

Gets the IDocumentObject.InstanceId of the object associated with this action.
public Guid Id { get; }
inherited fromObjectAction

Name

#
Name of property to get or set.
public string Name { get; }

Response

Gets the automatic response required by this action.
public Effects Response { get; }
inherited fromAction

State

Gets the state this action is in.
public State State { get; }
inherited fromAction

Methods

Extends

#
public override bool Extends(
action
)
Action.Extends

PerformRedo

Redo this action. This is only allowed if the Action.State equals State.Redo.
public bool PerformRedo()
inherited fromAction

PerformRedoInternal

#
protected override void PerformRedoInternal()

PerformRedoInternal

protected sealed override void PerformRedoInternal()
inherited fromObjectAction

PerformUndo

Undo this action. This is only allowed if the Action.State equals State.Undo.
public bool PerformUndo()
inherited fromAction

PerformUndoInternal

#
protected override void PerformUndoInternal()

PerformUndoInternal

protected sealed override void PerformUndoInternal()
inherited fromObjectAction

PrepareRedo

Run the preperatory work for a redo operation. The Action.PerformRedo(Document) method ought never be called without a preceding call to Action.PrepareRedo(Document), although note that a call to Action.PrepareRedo(Document) is not necessarily followed by a call to Action.PerformRedo(Document).
public bool PrepareRedo()
inherited fromAction

PrepareRedoInternal

#
protected override void PrepareRedoInternal()

PrepareRedoInternal

protected sealed override void PrepareRedoInternal()
inherited fromObjectAction

PrepareUndo

Run the preperatory work for an undo operation. The Action.PerformUndo(Document) method ought never be called without a preceding call to Action.PrepareUndo(Document), although note that a call to Action.PrepareUndo(Document) is not necessarily followed by a call to Action.PerformUndo(Document).
public bool PrepareUndo()
inherited fromAction

PrepareUndoInternal

#
protected override void PrepareUndoInternal()

PrepareUndoInternal

protected sealed override void PrepareUndoInternal()
inherited fromObjectAction

Store

#
public override void Store(
writer
)