Skip to content

UndoManager Property

Description

Manager used to Undo and Redo edit operations in the Flow Graph.

Property Type

Read-only property

Syntax (Visual Basic)

Public Property UndoManager() As [FlowGraphUndoManager](XtremeFlowGraph~FlowGraphUndoManager.md)

Return Type

Reference to the FlowGraphUndoManager.

Remarks

The FlowGraphUndoManager allows certain edit operations to be undone and redone in the Flow Graph. Supported operations are:

  • Add Nodes
  • Remove Nodes
  • Move Nodes
  • Resize Nodes
  • Move Connector Lines
  • Rename Nodes
  • Grouping

If any of these operations are performed, they can easily be undone/redone using the methods of the FlowGraphUndoManager.

The StartGroup and EndGroup methods are used to "group" a set of "undoable" operations together. Grouping the operations is useful as grouped operations can be undone or redone with a single call to Undo or Redo. If the operations are not grouped, you would have to call Undo or Redo for each operation performed.

Any "undoable" operations performed between StartGroup and EndGroup will be undone/redone with a single call to Undo or Redo.

In the sample below, a single Undo call will replace all deleted Nodes, no matter how many were deleted.

Dim Node As FlowGraphNode

FlowGraph.UndoManager.StartGroup
For Each Node In FlowGraph.Selection
    Node.Remove
Next
FlowGraph.UndoManager.EndGroup

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.