In general, undo operations are organized per ArcGIS.Desktop.Framework.Contracts.Pane and ArcGIS.Desktop.Framework.Contracts.DockPane. In other words, each Pane and DockPane manages its own operation stack. For example, operations added to map A are not visible to map B. The active window (Pane or DockPane) becomes the active OperationManager. When a window becomes active, its OperationManager is requested and connected to the undo/redo user interface.
Panes and DockPanes may however elect to share OperationManagers. For example, two Panes that are showing the same map will have the same OperationManager.
//undo if (MapView.Active.Map.OperationManager.CanUndo) MapView.Active.Map.OperationManager.UndoAsync();//await as needed //redo if (MapView.Active.Map.OperationManager.CanRedo) MapView.Active.Map.OperationManager.RedoAsync();//await as needed
System.Object
ArcGIS.Desktop.Framework.OperationManager
ArcGIS.Desktop.Framework.CompositeOperationManager
Target Platforms: Windows 11, Windows 10, Windows 8.1