ComponentOne OrgChart for UWP
IsCollapsed Property

C1.UWP.OrgChart Assembly > C1.Xaml.OrgChart Namespace > C1OrgChart Class : IsCollapsed Property
Gets or sets a value that determines whether the node is currently displaying its children.
Syntax
'Declaration
 
Public Property IsCollapsed As System.Boolean
public System.bool IsCollapsed {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 Windows.UI.Xaml.Controls.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: <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

Reference

C1OrgChart Class
C1OrgChart Members