# Automatic Collapsing Menu

## Content



The Automatic Collapsing feature provides you a way to collapse or close the C1RadialMenu control from its opened state. The only way available with the users to close the radial menu is by clicking the [Navigation Button](/componentone/docs/wpf/online-menu5/overview/radial-menu/navigation-button). However, the automatic collapsing feature enables users in closing a radial menu by clicking anywhere outside the control's boundaries.

The [AutoCollapse](/componentone/api/wpf/online-menu5/dotnet-api/C1.WPF.Menu/C1.WPF.Menu.C1RadialMenu.AutoCollapse.html) property of the [C1RadialMenu](/componentone/api/wpf/online-menu5/dotnet-api/C1.WPF.Menu/C1.WPF.Menu.C1RadialMenu.html) class enables automatic collapsing of the radial menu control. You can set the **AutoCollapse** property **True,** which allows users to close a radial menu by clicking anywhere outside the control's boundaries. To disable this behavior, you can set the AutoCollapse property **False.** By default, the AutoCollapse property is set **True**.

### In XAML

```xml
<c1:C1RadialMenu AutoCollapse = True></c1:C1RadialMenu>
```

### In Code

1.  In Source view locate, the **\<C1RadialMenuItem>** tag for the item you wish to make checkable and add **Name="C1RadialMenu1"** to it. This will give the item a unique identifier that you can use in code.
2.  Enter **Code** view and add the following code beneath the **InitializeComponent()** method:

```csharp
C1RadialMenu1.AutoCollapse = true;
```

3.  Run the program.

After you run the project, right-click the page to view the C1RadialMenu control. With the radial menu open, click anywhere outside the menu and observe that the radial menu control closes.

### Collapsing RadialMenu By Clicking Child RadialMenuItems

The RadialMenu also provides automatic collapsing on clicking the child radial menu items having no item in it. To enable this behavior, you need to set the [CollapseOnClick](/componentone/api/wpf/online-menu5/dotnet-api/C1.WPF.Menu/C1.WPF.Menu.C1RadialMenuItem.CollapseOnClick.html) property **True.**

### In XAML

```xml
<c1:C1RadialMenu CollapseOnClick = True></c1:C1RadialMenu>
```

### In Code

```csharp
C1RadialMenuItem1.CollapseOnClick = true;
```