Search
UndoManager Class
Remarks See Also
 





Implements undo/redo functionality in WpfDiagram.

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public class UndoManager

Visual Basic  Copy Code

Public Class UndoManager

 Remarks

The only instance of UndoManager can be accessed by 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.

WpfDiagram 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 WpfDiagram 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.

 Inheritance Hierarchy

System.Object
    MindFusion.Diagramming.Wpf.UndoManager

 See Also