# Expand and Collapse Behavior

## Content



By default, the Accordion control expands only one page at a time and collapses all the other pages. However, you can change this behavior of the accordion pages to expand multiple pages at a time by setting [AllowExpandMany](/componentone/docs/win/online-accordion/) property of the [C1Accordion](/componentone/docs/win/online-accordion/) class to **true**.

The following image shows all the expanded pages in Accordion.

![Expanded WinForms Accordion Page](https://cdn.mescius.io/document-site-files/images/a9d1222b-0ddf-4c55-8888-49748b62a8c3/images/expandmany.png)

To expand multiple pages at a time, use the following code.

```csharp
//allow expanding multiple pages
 c1Accordion1.AllowExpandMany = true;
```

Similarly, by default, the Accordion control keeps one page always expanded. However, you can change this behavior of the accordion pages to collapse all the pages by setting [AllowCollapseAll](/componentone/docs/win/online-accordion/) property of the **C1Accordion** class to **true**.

The following image shows all the collapsed pages in Accordion.

![Collapsed WinForms Accordion Page](https://cdn.mescius.io/document-site-files/images/a9d1222b-0ddf-4c55-8888-49748b62a8c3/images/collapseall.png)

To collapse all the pages in Accordion, use the following code.

```csharp
//allow collapsing all pages
c1Accordion1.AllowCollapseAll = true;
```