ArcGIS Pro 3.6 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapTOCContentType Enumeration
Example Example

In This Topic
    MapTOCContentType Enumeration
    In This Topic
    Specifies the type or "list" of map content
    Syntax
    Members
    MemberDescription
    DataSource List by data source
    DrawingOrder List by drawing order
    Editing List by editability
    Labeling List By labeling
    OrthoMapping List By Ortho Mapping Entities
    PerspectiveImagery List By Perspective Imagery
    RealityMapping List By Reality Mapping Entities
    Selection List by selection
    Snapping List by snapping
    Unknown List by content type is unkown
    Example
    Get the Active Map TOC content type
    //Get the current active TOC content type for the map view 
    var mapTOCContentType = MapView.Active.CurrentMapTOCContent;
    
    Set the Active Map TOC content type
          //Get the current active TOC content type for the map view 
          var mapTOCContentType = (int)MapView.Active.CurrentMapTOCContent;
    //increment to the next tab whatever it is
    mapTOCContentType++;
    //Can we set this type on the TOC?
          if (MapView.Active.CanSetMapTOCContent((MapTOCContentType)mapTOCContentType))
      //Set it - must be on the UI! - No QueuedTask
              MapView.Active.SetMapTOCContentAsync((MapTOCContentType)mapTOCContentType);
    else
    {
              mapTOCContentType = (int)MapTOCContentType.DrawingOrder;
              //Set it - must be on the UI! - No QueuedTask
              MapView.Active.SetMapTOCContentAsync((MapTOCContentType)mapTOCContentType);
          }
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Desktop.Mapping.MapTOCContentType

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.6 or higher.
    See Also