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

In This Topic
    InstanceID Property (Pane)
    In This Topic
    Gets the Framework assigned ID.
    Syntax
    public uint InstanceID {get;}
    Public ReadOnly Property InstanceID As UInteger
    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