Gets or sets a value that determines whether the node is currently displaying its children.

Namespace:  C1.Silverlight.OrgChart
Assembly:  C1.Silverlight.OrgChart (in C1.Silverlight.OrgChart.dll)

Syntax

C#
public bool IsCollapsed { get; set; }
Visual Basic
Public Property IsCollapsed As Boolean
	Get
	Set

Remarks

You may use this property to create organizational charts with nodes that can be collapsed or expanded by users. One simple way to do this is by adding a CheckBox element to the item template and binding its [!:CheckBox.IsChecked] property to the IsCollapsed property of the C1OrgChart that represents the given item. For example:
Copy CodeC#
<c1:C1OrgChart>
  <c1:C1OrgChart.ItemTemplate>
    <DataTemplate>
      <StackPanel>    
        <TextBlock Text="{Binding Name}" />
        <CheckBox 
          Margin="4 0" 
          IsChecked="{Binding IsCollapsed, 
            Mode=TwoWay, 
            RelativeSource={RelativeSource AncestorType=c1:C1OrgChart}}" />
      </StackPanel>    
    </DataTemplate>
  </c1:C1OrgChart.ItemTemplate>
</c1:C1OrgChart>
This XAML binds the IsChecked property of the CheckBox to the IsCollapsed property of the C1OrgChart control that contains the item. The user may then collapse or expand the chart by checking the CheckBox.

See Also