Accordion for WPF | ComponentOne
WPF Layout Controls / Accordion / Expanding and Collapsing / Expand Direction
In This Topic
    Expand Direction
    In This Topic

    In Accordion control, users can set the direction in which the accordion pane would expand to display the items. By default the Accordion expands in downward direction and the control expands from top to bottom.  The C1Accordion class provides the ExpandDirection property for this purpose. The ExpandDirection enumeration lets the user expand the Accordion in four directions: Left, Right, Up or Down direction. This feature lets the user fit the accordion control into a variety of application UIs.

    Expanding Direction

    Snapshot

    Expand Down (default)

    Snapshot of Accordion expanding downwards.

    Expand Up

    Snapshot of Accordion expanding upwards.

    Expand Right

    Snapshot of Accordion expanding to the right.

    Expand Left

    Snapshot of Accordion expanding to the left.

    The code snippet below illustrates how to set the direction for expansion in Accordion as 'right':

    <c1:C1Accordion x:Name="accordion" Width="300" Margin="25" ExpandDirection="Right">
    </c1:C1Accordion>
    accordion.ExpandDirection = C1.WPF.Accordion.ExpandDirection.Right;