# LayoutControlExpanderGroup

**LayoutControlExpanderGroup** is one of the few layout groups supported by the **RadLayoutControl**. **LayoutControlExpanderGroup** behaves as the **LayoutControlGroup** but its children are displayed in an **expander control**. Clicking on the group’s header or the expand arrow will expand or collapse its children.

> You can read the [Layout Panel](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/getting-started/layout-panel) article to get better understanding on how the layout groups are arranging their children.

**Example 1: Setting up LayoutControlExpanderGroup**

```XAML
<telerik:RadLayoutControl >
    <telerik:LayoutControlExpanderGroup Header="Layout Control Expander Group">
        <Button Content="Item 1" />
        <Button Content="Item 2" />
    </telerik:LayoutControlExpanderGroup>
</telerik:RadLayoutControl>
```

> caption LayoutControlExpanderGroup

![WPF RadLayoutControl LayoutControlExpanderGroup](https://www.telerik.com/products/wpf/documentation/assets/1cc1ee4cbe4d730f77aca13e1ba50467/layoutcontrol-features-layoutcontrolexpandergroup-01.png)

The header of the expander group can be set through its **Header** property. The property is of type **Object** which allows you to place any visual (or not) element in it.

**Example 2: Setting up the header of LayoutControlExpanderGroup**

```XAML
<telerik:RadLayoutControl>
    <telerik:LayoutControlExpanderGroup>
        <telerik:LayoutControlExpanderGroup.Header>
            <StackPanel Orientation="Horizontal">
                <Rectangle Width="10" Height="10" Fill="Orange" Margin="0 0 5 0" />
                <TextBlock Text="Layout Control Expander Group" FontWeight="Bold" />
            </StackPanel>
        </telerik:LayoutControlExpanderGroup.Header>
        <Button Content="Item 1" />
        <Button Content="Item 2" />
    </telerik:LayoutControlExpanderGroup>
</telerik:RadLayoutControl>
```

> caption LayoutControlExpanderGroup with UIElements in its header

![WPF RadLayoutControl LayoutControlExpanderGroup with UIElements in its header](https://www.telerik.com/products/wpf/documentation/assets/7ce14da42654824021e91d3879ba2ffd/layoutcontrol-features-layoutcontrolexpandergroup-02.png)

The group’s content state (collapsed/expanded) can be manually controlled via the **IsExpanded** property.

**Example 3: Setting the state of LayoutControlExpanderGroup**

```XAML
<telerik:LayoutControlExpanderGroup IsExpanded="False">
```

> caption Collapsed LayoutControlExpanderGroup

![WPF RadLayoutControl Collapsed LayoutControlExpanderGroup](https://www.telerik.com/products/wpf/documentation/assets/7319a804792212e5a909b082bbf977dd/layoutcontrol-features-layoutcontrolexpandergroup-03.png)

> You can notice that the size of the group demonstrated in **Figure 3** and **Example 3** doesn't collapse, but only its children are hidden (collapsed). This is because the group's **VerticalAlignment** is set to **Stretch** by default. In this example, if you want to collapse also the size of the group itself you can set the **VerticalAlignment** to **Top**.

The **IsExpandable** property of LayoutControlExpanderGroup controls whether the expanding arrow should be displayed and the collapse/expand action can be executed by clicking on the header.

**Example 4: Setting the IsExpandable property of LayoutControlExpanderGroup**

```XAML
<telerik:LayoutControlExpanderGroup IsExpandable="False">
```

> caption LayoutControlExpanderGroup with disabled collapse/expand interactions

![WPF RadLayoutControl LayoutControlExpanderGroup with disabled collapse/expand interactions](https://www.telerik.com/products/wpf/documentation/assets/4bfadf62021850e975da9bb97a5f0968/layoutcontrol-features-layoutcontrolexpandergroup-04.png)

> When the **IsExpandable** property is set to **False** the content of the group can still be collapsed and expanded via the **IsExpanded** property.



> When no explicit dimensions are set the size of the group depends on its position in the layout and also its alignment. When a group is collapsed it is not necessary that its size collapses too. This depends on its size and alignment.

## See Also

* [Getting Started](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/getting-started/getting-started)
* [Layout Groups Overview](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/layoutgroups/overview)
* [LayoutControlGroup](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/layoutgroups/layoutcontrolgroup)
* [LayoutControlTabGroup](https://www.telerik.com/products/wpf/documentation/controls/radlayoutcontrol/features/layoutgroups/layoutcontroltabgroup)
