public void SetMapTOCContentAsync( MapTOCContentType mapTOCContentType )
Public Sub SetMapTOCContentAsync( _ ByVal mapTOCContentType As MapTOCContentType _ )
Parameters
- mapTOCContentType
- The content type to be set
public void SetMapTOCContentAsync( MapTOCContentType mapTOCContentType )
Public Sub SetMapTOCContentAsync( _ ByVal mapTOCContentType As MapTOCContentType _ )
| Exception | Description |
|---|---|
| System.InvalidOperationException | The calling thread cannot access this object because a different thread owns it |
//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);
}
Target Platforms: Windows 11, Windows 10