This topic demonstrates how to configure the visibility of the Expansion Indicators for a Node, Node Layout, and the xamOrgChart control.
The topic is organized as follows:
The visibility of the Expansion Indicator can be configured on the following objects (ordered by priority from highest to lowest):
Node – each node can have its Expansion Indicator visibility set separately
Node Layout –the nodes recognized by the Node Layout
XamOrgChart – affects all nodes
Figure 1: The circled nodes are with hidden Expansion Indicators
The following sample demonstrates how to set the Expansion Indicator visibility on a specific OrgChartNode object, e.g. a clicked node.
In XAML:
<ig:XamOrgChart
NodeMouseLeftButtonDown="XamOrgChart_NodeMouseLeftButtonDown">
</ig:XamOrgChart>
In Visual Basic:
Private Sub XamOrgChart_NodeMouseLeftButtonDown(sender As Object, e As OrgChartNodeClickEventArgs) e.Node.Node.ExpansionIndicatorVisibility = Visibility.Collapsed End Sub
In C#:
private void XamOrgChart_NodeMouseLeftButtonDown(object sender, OrgChartNodeClickEventArgs e) { e.Node.Node.ExpansionIndicatorVisibility = Visibility.Collapsed; }
Each Node Layout will apply the Expansion Indicator visibility to the nodes it recognizes.
In XAML:
<ig:OrgChartNodeLayout
TargetTypeName="EmployeePosition"
DisplayMemberPath="JobTitle"
Key="Employees"
ExpansionIndicatorVisibility="Collapsed" />
In XAML:
<ig:XamOrgChart
ExpansionIndicatorVisibility="Collapsed" />
</ig:XamOrgChart>