ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Framework.Contracts Namespace / DockPane Class / Activate Method / Activate() Method
Example

In This Topic
    Activate() Method
    In This Topic
    Activates the DockPane and gives it focus.
    Syntax
    Public Overloads Sub Activate() 
    public void Activate()
    Example
    Set the catalog dockpane as the active window
    {
      //cast ICatalogWindow to ArcGIS.Desktop.Framework.Contracts.DockPane
      var catalogWindow = Project.GetCatalogPane() as DockPane;
      //Activate it
      catalogWindow.Activate();
    }
    Dockpane operations
    {
      // in order to find a dockpane you need to know its DAML id
      pane = FrameworkApplication.DockPaneManager.Find(dockPaneID);
    
      // determine visibility
      bool visible = pane.IsVisible;
    
      // activate it
      pane.Activate();
    
      // determine dockpane state
      DockPaneState state = pane.DockState;
    
      // pin it
      pane.Pin();
    
      // hide it
      pane.Hide();
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also