Select to view content in your preferred language

Odd undo behavior inside of dockpane

508
3
Jump to solution
08-30-2023 07:43 AM
MBambino_ATS
New Contributor III

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?

1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

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

 

View solution in original post

3 Replies
GKmieliauskas
Esri Regular Contributor

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

 

MBambino_ATS
New Contributor III

That worked! thank you so much!

0 Kudos
anonymous_geographer
Occasional Contributor

I was struggling through this as well. Thanks for the answer. 👍

0 Kudos