UndoManager Class
Provides the functionality for undo and redo operations.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.Modeling.UndoManager
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)
Syntax
'Declaration
Public Class UndoManager _
Implements IDisposable
public class UndoManager : IDisposable
public ref class UndoManager : IDisposable
type UndoManager =
class
interface IDisposable
end
public class UndoManager implements IDisposable
The UndoManager type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UndoManager(Context) | constructor. | |
UndoManager(Store) | constructor. |
Top
Properties
Name | Description | |
---|---|---|
CanUndoRedoCallbackCollection | ||
Context | The Context that contains the UndoManager | |
InRedo | Return whether are not the undo manager is in the middle of a redo or not. | |
InUndo | Return whether are not the undo manager is in the middle of an undo or not. | |
MaxUndoableTransactions | Maximum number of undo items visible on the undo stack | |
RedoableTransactions | List of redoable TransactionItems maintained by the UndoManager. | |
RedoCount | Number of items in redo stack | |
Store | The Store that contains the UndoManager | |
TopmostUndoableTransaction | Return topmost transaction ID in undo stact | |
UndoableTransactions | List of undoable TransactionItems maintained by the UndoManager. | |
UndoCount | Number of items in undo stack. | |
UndoState | The state of Undo. |
Top
Methods
Name | Description | |
---|---|---|
AddCanUndoRedoCallback | Add CanUndoRedo voter. | |
AddUndoableAction | Add an undoable action to the undo stack. This will clear the redo stack. | |
Dispose | Dispose method | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Finalizer (Overrides Object.Finalize.) | |
Flush | Flush the undo and redo stacks. If we are in the middle of a transaction, throw an exception. | |
FlushRedoStack | Clears the redo stack. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Redo() | Redo the actions of the topmost transaction on the redo stack. | |
Redo(Guid) | Redo the actions committed in the transaction whose id is passed in. Make sure the id passed in is the transaction that is on top of the stack. Otherwise throw an exception. | |
RedoAllPossible | Redo all possible transactions on redo stack. | |
RemoveCanUndoRedoCallback | Remove CanUndoRedo voter. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Undo() | Undo the actions of the topmost transaction on undo stack. | |
Undo(Guid) | Undo the actions committed in the transaction whose id is passed in. Make sure the id passed in is the transaction that is on top of the stack. Otherwise throw an exception. | |
UndoAllPossible | Undo all transactions in undo stack that can be undone. |
Top
Events
Name | Description | |
---|---|---|
RedoStackFlushed | Allows clients to receive an event when the redo stack is flushed | |
UndoItemAdded | Event that is fired every time an undo item is added to the undo stack | |
UndoItemDiscarded | Event that is fired every time an undo item is discarded from the undo stack because the stack size exceeded the maximum number of undo items permitted. | |
UndoStackFlushed | Allows clients to receive an event when the undo stack is flushed |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.VisualStudio.Modeling Namespace