WPF Layout Controls | ComponentOne
WPF Layout Controls / Expander / Expand State
In This Topic
    Expand State
    In This Topic

    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.

    Checkbox added to the content area of the Expander control

    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;