I am working on a project using the ArcGIS Pro SDK. The project contains a MapView, as well as a few custom dockpanes that can show additional information and controls for elements that appear on the map. When I make an edit inside of the dockpane, the edit applies, saves, and shows correctly, but the undo button does not become active. If I click into another pane, however (such as the map view or the contents panel), the undo button activates and even contains the edits made inside of the dockpane as well as other map related edits. If I click back into the dockpane, the undo button disables. is there a way to make the undo buttons behave correctly when inside of the dockpane?
Solved! Go to Solution.
Hi,
You need to add more behavior to default dock pane implementation:
//Gets the OperationManager associated with the current map or null
public override OperationManager OperationManager {
get {
return MapView.Active?.Map.OperationManager;
//or LayoutView.Active... for the Layout
}
}
More info here:
ProGuide DockPanes · Esri/arcgis-pro-sdk Wiki · GitHub
Hi,
You need to add more behavior to default dock pane implementation:
//Gets the OperationManager associated with the current map or null
public override OperationManager OperationManager {
get {
return MapView.Active?.Map.OperationManager;
//or LayoutView.Active... for the Layout
}
}
More info here:
ProGuide DockPanes · Esri/arcgis-pro-sdk Wiki · GitHub
That worked! thank you so much!
I was struggling through this as well. Thanks for the answer. 👍