ASP.NET Pack Programmer's Guide
CommandHistory Class
Remarks See Also
 





Maintains a queue of Command records used to undo or redo actions.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public class CommandHistory

Visual Basic  Copy Code

Public Class CommandHistory

 Remarks

The only instance of CommandHistory can be accessed through the History property of UndoManager.

The Capacity property specifies how many Command instances can be stored in the history queue. If the queue is full and a new action is recorded, the oldest one will be removed and made unavailable for undo/redo. A read-only access to the command queue is provided by the Commands property.

The CommandHistory instance maintains an internal record pointer. The pointer is decreased or increased by one when an action is respectively undone or redone through the undo manager. The pointer actually refers to two adjacent action records - the older one to be used when undoing, the newer one when redoing commands. Those two records can be accessed by NextUndo and NextRedo properties. When no action has been undone, the pointer refers to the end of the queue and NextRedo returns null (Nothing in Visual Basic). When all actions have been undone, the pointer refers to the start of the queue and NextUndo returns null.

Call Clear to remove all action records that are currently in the history queue, making those actions unavailable for undo or redo anymore. That won't disable adding new records to the queue, so it will be possible to undo/redo any actions executed after Clear.

 Inheritance Hierarchy

System.Object
    MindFusion.Diagramming.CommandHistory

 See Also

CommandHistory Members
MindFusion.Diagramming Namespace