ComponentOne Accordion for ASP.NET Web Forms
Task-Based Help / Changing the Direction of the Expanding Content Pane
In This Topic
    Changing the Direction of the Expanding Content Pane
    In This Topic

    The C1Accordion control allows users to expand pane content from the top, bottom, left, or right. Simply set the ExpandDirection property to take advantage of this feature.

    Design Time

    1. Click the C1Accordion smart tag to open the C1Accordion Tasks menu.
    2. Click the drop-down arrow next to the ExpandDirection property and select one of the options, Top, for example.

    In Code

    Add the following code to the Page_Load event, for example, to set the ExpandDirection property.

    To write code in Visual Basic

    Visual Basic
    Copy Code
    C1Accordion1.ExpandDirection = ExpandDirection.Top

    To write code in C#

    C#
    Copy Code
    C1Accordion1.ExpandDirection = ExpandDirection.Top;

    In Markup

    You can add the markup for the ExpandDirection property directly to the C1Accordion markup. It is automatically added to the markup if you set the property in the page at design time. The markup looks like the following:

    Copy Code
    <cc1:C1Accordion ID="C1Accordion1" runat="server" ExpandDirection="Top">
    

    When you run the application and click an accordion header, the content expands upward, above the header.

    See Also