You can manage the maximum number of levels displayed in the xamOrgChart™ through its MaxDepth property; the number of actually displayed levels is stored in the ActualDepth property (This property is read-only.). Figure 1 illustrates the effect of the different values of the MaxDepth property.
Figure 1: Different depth levels displayed by the xamOrgChart control based on different settings of its MaxDepth property
This code below uses the Org Chart implementation created in the Adding xamOrgChart to Your Application topic.
In XAML:
<ig:XamOrgChart MaxDepth="4"> </ig:XamOrgChart>
In Visual Basic:
Dim orgChart As New XamOrgChart() orgChart.MaxDepth = 4 Dim acturalDepth As Integer = orgChart.ActualDepth
In C#:
XamOrgChart orgChart = new XamOrgChart(); orgChart.MaxDepth = 4; int acturalDepth = orgChart.ActualDepth;