# C1.WPF.OrgChart.C1OrgChart.IsCollapsed

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_OrgChart_C1OrgChart_IsCollapsed_" data-uid="C1.WPF.OrgChart.C1OrgChart.IsCollapsed*">IsCollapsed Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_OrgChart_C1OrgChart_IsCollapsed_" data-uid="C1.WPF.OrgChart.C1OrgChart.IsCollapsed*"></a>
<h4 id="C1_WPF_OrgChart_C1OrgChart_IsCollapsed" data-uid="C1.WPF.OrgChart.C1OrgChart.IsCollapsed">IsCollapsed</h4>
<div class="markdown level1 summary"><p>Gets or sets a value that determines whether the node is currently displaying its children.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool IsCollapsed { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property IsCollapsed As Boolean</code></pre>
</div>
<h5 id="C1_WPF_OrgChart_C1OrgChart_IsCollapsed_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>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 <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.checkbox">CheckBox</a>
element to the item template and binding its CheckBox.IsChecked property
to the <a class="xref" href="C1.WPF.OrgChart.C1OrgChart.IsCollapsed.html#C1_WPF_OrgChart_C1OrgChart_IsCollapsed">IsCollapsed</a> property of the <a class="xref" href="C1.WPF.OrgChart.C1OrgChart.html">C1OrgChart</a> that represents
the given item. For example:</p>
<pre><code class="lang-csharp">&lt;c1:C1OrgChart&gt;
  &lt;c1:C1OrgChart.ItemTemplate&gt;
    &lt;DataTemplate&gt;
      &lt;StackPanel&gt;    
        &lt;TextBlock Text="{Binding Name}" /&gt;
        &lt;CheckBox 
          Margin="4 0" 
          IsChecked="{Binding IsCollapsed, 
            Mode=TwoWay, 
            RelativeSource={RelativeSource AncestorType=c1:C1OrgChart}}" /&gt;
      &lt;/StackPanel&gt;    
    &lt;/DataTemplate&gt;
  &lt;/c1:C1OrgChart.ItemTemplate&gt;
&lt;/c1:C1OrgChart&gt;</code></pre>
<p>This XAML binds the <b>IsChecked</b> property of the <b>CheckBox</b> to the
<b>IsCollapsed</b> property of the <b>C1OrgChart</b> control that contains the
item. The user may then collapse or expand the chart by checking the <b>CheckBox</b>.</p>
</div>
</div>
