Accordion for WinForms | ComponentOne
Expanding and Collapsing / Expand and Collapse Icon
In This Topic
    Expand and Collapse Icon
    In This Topic

    Expand/Collapse icon appears on top right corner of the header of the Accordion page. When clicked, it expands the content area of the page. AccordionPage allows you to change the icon image for the expanded and collapsed page by providing the following properties in C1AccordionPageSettings class.

    Properties Description
    ExpandDownIconImage It sets the icon image displayed in the header of a collapsed page when ExpandDirection is set to Down. This property also sets the icon image for an expanded page when its ExpandDirection is set to Up.
    ExpandRightIconImage It sets the icon image displayed in the header of a collapsed page when ExpandDirection is set to Right. This property also sets the icon image for an expanded page when its ExpandDirection is set to Left.
    CollapseDownIconImage It sets the icon image displayed in the header of an expanded page when ExpandDirection is set to Down. This property also sets the icon image for a collapsed page when its ExpandDirection is set to Up.
    CollapseRightIconImage It sets the icon image displayed in the header of an expanded page when ExpandDirection is set to Right. This property also sets the icon image for a collapsed page when its ExpandDirection is set to Down.

    The following image showcases icon images set in a page.

    ed WinForms Accordion Page Expand/Collapse Icon

    To change the expand and collapse icon images, use the following code.

    C#
    Copy Code
    //change expand and collapse icons
    c1Accordion1.PageSettings.CollapseDownIconImage = Resources.squareUp;
    c1Accordion1.PageSettings.CollapseRightIconImage = Resources.squareleft;
    
    c1Accordion1.PageSettings.ExpandDownIconImage = Resources.squareDown;
    c1Accordion1.PageSettings.ExpandRightIconImage = Resources.squareright;