Accordion for WPF | ComponentOne
WPF Layout Controls / Expander / Expand Direction
In This Topic
    Expand Direction
    In This Topic

    The Expander control allows you to change the direction in which you want it to expand. You can set the expansion direction for the Expander control using ExpandDirection property of the C1Expander class. The ExpandDirection property accepts values from the ExpandDirection enumeration that specifies the direction in which the Expander control expands. It allows you to expand the Expander control in up, down, right and left directions.

    By default, the control expands downwards as the ExpandDirection property is set to Down. However, when you change the expansion direction of the expander, it also changes the header's orientation to the content area of the control as shown in the image below.

    Expander control expanded in right direction

    The following code illustrates the use of ExpandDirection property to expand the Expander control in right direction.

    <c1:C1Expander x:Name="ExpanderControl" Header="Expand Me!" ExpandDirection="Right" FontFamily="Cambria" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center">
            <CheckBox Margin="10" VerticalAlignment="Center" x:Name="Condition" Content="CheckBox Inside Expander"/>
    </c1:C1Expander>
    ExpanderControl.ExpandDirection = C1.WPF.Accordion.ExpandDirection.Right;