UndoEngine.UndoUnit.Undo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Performs an undo or redo action.
public:
void Undo();
public void Undo ();
member this.Undo : unit -> unit
Public Sub Undo ()
Remarks
Undo actions toggle themselves between undo and redo states, so calling Undo twice sets the object back to its original state.
The UndoEngine.UndoUnit class initially assumes that the undoable work has already been done, so the first call to Undo undoes the work. The next call undoes the previous undo operation, performing a redo.
The Undo method calls the UndoCore method to perform an undo operation. The Undo method itself works to maintain consistent state within the UndoEngine.UndoUnit, even in the event of an exception thrown by UndoCore.
Notes to Inheritors
Do not call the UndoCore() method directly; override it if you want, but always call the public
Undo() method to perform undo work. The Undo() method notifies the undo engine to suspend undo data gathering until the current undo operation is completed. This prevents new undo units from being created in response to this unit doing work.