Implements undo/redo functionality in MindFusion.Diagramming.
Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming
C# Copy Code |
---|
public class UndoManager |
Visual Basic Copy Code |
---|
Public Class UndoManager |
The only instance of UndoManager can be accessed through the UndoManager property of Diagram.
Use the UndoEnabled property to enable or disable saving action records for later undo. You might need to disable undo before performing actions that must not be undoable by end-users, such as creating special start/end nodes.
MindFusion.Diagramming does not provide shortcuts to undo or redo an action. An application must provide the user interface means for undo/redo and call the Undo or Redo methods when necessary. Undoing or redoing an action updates the current record pointer of the undo-history queue. To get access to that queue, use the History property.
Sometimes several actions must be represented as a single atomic operation. That can be achieved by using composites, represented by the CompositeCmd class. However actions records that are implicitly created by MindFusion.Diagramming as a response to users actions or method calls cannot be added directly to a composite. Instead you must use the StartComposite method to create an 'active' composite, to which implicitly created records are added automatically.
System.Object
MindFusion.Diagramming.UndoManager
MindFusion.Diagramming Developer's Guide | © 2024 MindFusion |