ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / KnowledgeGraphMappingExtensions Class / SetShowRootNodes Method
Value indicating whether to display root nodes.
Example Version

SetShowRootNodes Method
Sets whether root nodes are displayed for the link chart map view. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static void SetShowRootNodes( 
   MapView mapView,
   bool showRootNodes
)

Parameters

mapView
showRootNodes
Value indicating whether to display root nodes.
Exceptions
ExceptionDescription
Map cannot be null.
Map is not a link chart.
This method or property must be called within the lambda passed to QueuedTask.Run.
Example
Toggle Root Node Display
var val = MapView.Active.GetShowRootNodes();

await QueuedTask.Run(() =>
{
  MapView.Active.SetShowRootNodes(!val);
});
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also