OleUndoEngine Class
Provides a default implementation of undo management for designers.
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
System.ComponentModel.Design.UndoEngine
Microsoft.VisualStudio.Shell.Design.OleUndoEngine
| Name | Description | |
|---|---|---|
![]() | OleUndoEngine(IServiceProvider) | Initializes a new instance of OleUndoEngine. |
| Name | Description | |
|---|---|---|
![]() | Enabled | (Inherited from UndoEngine.) |
![]() | UndoInProgress | (Inherited from UndoEngine.) |
| Name | Description | |
|---|---|---|
![]() | AddUndoUnit(UndoEngine.UndoUnit) | Adds the undo unit to the undo unit manager.(Overrides UndoEngine.AddUndoUnit(UndoEngine.UndoUnit).) |
![]() | CreateUndoUnit(String, Boolean) | Creates a new undo unit.(Overrides UndoEngine.CreateUndoUnit(String, Boolean).) |
![]() | DiscardUndoUnit(UndoEngine.UndoUnit) | Closes this unit if it is a parent undo unit.(Overrides UndoEngine.DiscardUndoUnit(UndoEngine.UndoUnit).) |
![]() | Dispose() | (Inherited from UndoEngine.) |
![]() | Dispose(Boolean) | Disposes the resources of this object.(Overrides UndoEngine.Dispose(Boolean).) |
![]() | Equals(Object) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetRequiredService(Type) | (Inherited from UndoEngine.) |
![]() | GetService(Type) | (Inherited from UndoEngine.) |
![]() | GetType() | (Inherited from Object.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | OnUndoing(EventArgs) | (Inherited from UndoEngine.) |
![]() | OnUndone(EventArgs) | (Inherited from UndoEngine.) |
![]() | ToString() | (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | Undoing | (Inherited from UndoEngine.) |
![]() | Undone | (Inherited from UndoEngine.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo() | Indicates that the undo manager is blocking another undo manager from executing a linked action. |
The OleUndoEngine class provides a default implementation of the UndoEngine and IVsLinkedUndoClient interfaces used to manage undo operations, which allow users to reverse their recent changes when modifying a code element.
Note |
|---|
Typically, designers implemented under Visual Studio and .NET Framework are based on Control and have undo support automatically provided by the environment. |
Designers will need to implement their own undo management if either:
The designer uses a graphical user interface, referred to as a ViewAdapter, other than that supplied by Control.
This will require the registry of the ViewAdapter with Visual Studio using ProvideViewAdapterAttribute.
An example of this might be creating a product with a web-based graphical design interface rather than a .NET Framework based graphical interface.
The designers do not use the Visual Studio code generation model provided in the System.CodeDom name space.
The OleUndoEngine class transparently supports child undo units, as it uses custom undo units (atomic sections of code which can be removed in an undo operation) UndoEngine.UndoUnit, which fully implement IOleUndoUnit and IOleParentUndoUnit.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
UndoEngine.UndoUnit
OleUndoEngine
M:Microsoft.VisualStudio.Shell.Design.OleUndoEngine.Microsoft.VisualStudio.TextManager.Interop.IVsLinkedUndoClient.OnInterveningUnitBlockingLinkedUndo
OleUndoEngine
AddUndoUnit
CreateUndoUnit
DiscardUndoUnit
Dispose
Microsoft.VisualStudio.Shell.Design Namespace
Supplying Undo Support to Designers






