# .NET MAUI Accordion Expand and Collapse States

The purpose of this help article is to show you the expanded/collapsed states of the Telerik .NET MAUI Accordion control.

## Collapsed/Expanded States

In the Accordion control, each item provides a header that expands when clicked, showing more information. The control is designed in such a way that opening one `AccordionItem` automatically closes the previously displayed content.

There can be only one expanded item at a time indicated by `IsExpanded` property of the [AccordionItem](https://www.telerik.com/maui-ui/documentation/controls/accordion/accordion-item) object.

## Collapse All Items

Using the `CanCollapseAllItems`(`bool`) property you can collapse all Accordion items by tapping/clicking on the Accordion item header. The default value is `false`.

## Expand Multiple Items

By using the `CanExpandMultipleItems`(`bool`) property, you can allow users to expand more than one item. The default value is `false`. If `CanExpandMultipleItems` is `true`, clicking on the header of a collapsed accordion item will expand it, regardless of how many items are expanded. If `CanExpandMultipleItems` is `false`, the expansion of one item causes the collapse of a previously expanded accordion item.

## Example

The snippet below shows how the `CanCollapseAllItems` and `CanExpandMultipleItems` properties can be applied:

```XAML
<telerik:RadAccordion CanCollapseAllItems="True"
                      CanExpandMultipleItems="True"
                      AnimationDuration="1500"
                      AnimationEasing="{Static Easing.SpringOut}"
                      Spacing="5">
    <telerik:AccordionItem HeaderText="Attachments" IsExpanded="True">
        <telerik:AccordionItem.Content>
            <Button Text="Attach files" FontSize="20" Margin="10" />
        </telerik:AccordionItem.Content>
    </telerik:AccordionItem>
    <telerik:AccordionItem HeaderText="Comments">
        <telerik:AccordionItem.Content>
            <Label Text="Add your comment here" Margin="30" />
        </telerik:AccordionItem.Content>
    </telerik:AccordionItem>
    <telerik:AccordionItem HeaderText="Rating">
        <telerik:AccordionItem.Content>
            <telerik:RadShapeRating x:Name="rating" Margin="20" />
        </telerik:AccordionItem.Content>
    </telerik:AccordionItem>
</telerik:RadAccordion>
```

The image below shows the result after running the snippet:

![Telerik UI for .NET MAUI Accordion with multiple expanded items](https://www.telerik.com/maui-ui/documentation/assets/0c930c4a6c9a4520887aafe2a9c01d68/accordion-states-1.png)

And the `RadAccordion` when all items are collapsed:

![Telerik UI for .NET MAUI Accordion with all items collapsed](https://www.telerik.com/maui-ui/documentation/assets/4508d1b223d9e41c1b4c5d652b07da30/accordion-states-2.png)

> important For the Accordion Expand and Collapse states example refer to the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app).

## See Also

* [AccordionItem](https://www.telerik.com/maui-ui/documentation/controls/accordion/accordion-item)
* [Item spacing](https://www.telerik.com/maui-ui/documentation/controls/accordion/item-spacing)
* [Animation](https://www.telerik.com/maui-ui/documentation/controls/accordion/animation)
