Share via


UndoOption Enumeration

This enum controls how the undoable operation is treated on the undo stack.

Namespace:  Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)

Syntax

'Declaration
Public Enumeration UndoOption
public enum UndoOption
public enum class UndoOption
type UndoOption
public enum UndoOption

Members

Member name Description
Add Adds a new undo unit to the undo stack representing the changes that were made in the UndoableGraphTransactionScope.
Disable Do not add any undo unit to the undo stack. This is useful for hidden operations on the GraphModel that the user does not see.
Merge Try to merge the undo unit with any previous undo unit that has the same undoUnitId. If no matching undo unit is found, this unit is dropped. This is useful for undo units that result from something asynchronous occurring after the "Add" item or "AddForce" has been added. For example, you might add a "MoveNode" unit UndoOption.Add, but then later as the mouse moves you send a series of UndoOption.Merge with the same "MoveNode" id as the Add operation so that all the move operations are rolled up into one atomic undo unit until mouse up is received.

See Also

Reference

Microsoft.VisualStudio.GraphModel Namespace