WPF レイアウトコントロール
展開と折りたたみ
WPF レイアウトコントロール > Expander for WPF の概要 > 展開と折りたたみ

By default, the Expander control appears in collapsed state and the content area is not visible when the window is loaded. However, you can change the behavior of the control upon window load by setting IsExpanded property to True.

The following example code demonstrates the use of IsExpanded property of the C1Expander class to display the Expander control in expanded state. In this example, the IsExpanded property is set to true.

<c1:C1Expander x:Name="ExpanderControl" Header="Expand Me!" IsExpanded="True" FontFamily="Cambria" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center">
        <CheckBox Margin="10" VerticalAlignment="Center" x:Name="Condition" Content="CheckBox Inside Expander"/>
</c1:C1Expander>
ExpanderControl.IsExpanded = true;