MapTOCContentType Enumeration
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);
}
}
System.Object
System.ValueType
System.Enum
ArcGIS.Desktop.Mapping.MapTOCContentType
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)
ArcGIS Pro version: 3.6 or higher.