Version

Configuring the Visibility of Expansion Indicators

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:

Priorities in Configuring the Expansion Indicator

The visibility of the Expansion Indicator can be configured on the following objects (ordered by priority from highest to lowest):

  1. Node – each node can have its Expansion Indicator visibility set separately

  2. Node Layout –the nodes recognized by the Node Layout

  3. XamOrgChart – affects all nodes

xamOrgChart Expansion Indicator Visibility 01.png

Figure 1: The circled nodes are with hidden Expansion Indicators

Note
Note:

The illustration and the code samples use the Org Chart created in Adding xamOrgChart to Your Application.

Configuring the Visibility of the Expansion Indicator for a Node

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;
}

Configuring the Visibility of the Expansion Indicator for a Node Layout

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" />

Configuring the Visibility of the Expansion Indicator for the xamOrgChart

In XAML:

<ig:XamOrgChart
    ExpansionIndicatorVisibility="Collapsed" />
</ig:XamOrgChart>