C1.Silverlight.OrgChart Namespace > C1OrgChart Class : IsCollapsed Property |
'Declaration
Public Property IsCollapsed As System.Boolean
public System.bool IsCollapsed {get; set;}
<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.Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2