ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Framework.Contracts Namespace / Pane Class / ContentID Property
Example

In This Topic
    ContentID Property
    In This Topic
    Allows derived classes to provide a unique identifier for the Pane. The DAML ID is returned by default.
    Syntax
    public virtual string ContentID {get;}
    Public Overridable ReadOnly Property ContentID As String
    Example
    Close a specific pane
    {
      List<uint> myPaneInstanceIDs = [];
      foreach (Pane p in FrameworkApplication.Panes)
      {
        if (p.ContentID == paneID)
        {
          myPaneInstanceIDs.Add(p.InstanceID); //InstanceID of your pane, could be multiple, so build the collection
        }
      }
      foreach (var instanceID in myPaneInstanceIDs) //close each of "your" panes.
      {
        FrameworkApplication.Panes.ClosePane(instanceID);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also