public virtual OperationManager OperationManager {get;}
Public Overridable ReadOnly Property OperationManager As OperationManager
public virtual OperationManager OperationManager {get;}
Public Overridable ReadOnly Property OperationManager As OperationManager
Each Pane and DockPane instance by default has their own OperationManager which represents an operation stack. The application's undo/redo controls work with the current OperationManager which is established by the active window. When a Pane or DockPane is activated, its OperationManager is requested. Derived classes can use this method to provide their own OperationManager. For example, Map Panes representing a specific Map, all share the same OperationManager.
// in order to find a dockpane you need to know it's DAML id var pane = FrameworkApplication.DockPaneManager.Find("esri_core_contentsDockPane"); // get the undo stack OperationManager manager = pane.OperationManager; if (manager != null) { // undo an operation if (manager.CanUndo) await manager.UndoAsync(); // redo an operation if (manager.CanRedo) await manager.RedoAsync(); // clear the undo and redo stack of operations of a particular category manager.ClearUndoCategory("Some category"); manager.ClearRedoCategory("Some category"); }
Target Platforms: Windows 11, Windows 10, Windows 8.1