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(IDocumentObject obj, string property, Effects response = Effects.ExpireSolution, bool autoExtend = true)
Parameters:
| obj (IDocumentObject) | |
| property (string) | |
| response (Effects = Effects.ExpireSolution) | |
| autoExtend (bool = true) |
Properties
inherited fromObjectAction
State
public State State { get; }
Gets the state this action is in.
Methods
Extends
#Parameters:
| action (Action) |
Overrides: Action.Extends
PerformRedo
Redo this action. This is only allowed if the Action.State equals State.Redo.
Parameters:
| doc (Document) |
PerformRedoInternal
#Parameters:
| doc (Document) | |
| obj (IDocumentObject) |
Overrides: ObjectAction.PerformRedoInternal
PerformRedoInternal
Parameters:
| doc (Document) |
Overrides: Action.PerformRedoInternal
PerformUndo
Undo this action. This is only allowed if the Action.State equals State.Undo.
Parameters:
| doc (Document) |
PerformUndoInternal
#Parameters:
| doc (Document) | |
| obj (IDocumentObject) |
Overrides: ObjectAction.PerformUndoInternal
PerformUndoInternal
Parameters:
| doc (Document) |
Overrides: Action.PerformUndoInternal
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).
Parameters:
| doc (Document) |
PrepareRedoInternal
#Parameters:
| doc (Document) | |
| obj (IDocumentObject) |
Overrides: ObjectAction.PrepareRedoInternal
PrepareRedoInternal
Parameters:
| doc (Document) |
Overrides: Action.PrepareRedoInternal
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).
Parameters:
| doc (Document) |
PrepareUndoInternal
#Parameters:
| doc (Document) | |
| obj (IDocumentObject) |
Overrides: ObjectAction.PrepareUndoInternal
PrepareUndoInternal
Parameters:
| doc (Document) |
Overrides: Action.PrepareUndoInternal