# Selection and Focus

## Content



Sometimes, you might want an option to automatically select and focus the first item in the menu when it opens. This behavior can be achieved in the menu control by setting the [AutoSelectOnFocus](/componentone/api/mvc/online-mvc-core/dotnet-api/C1.AspNetCore.Mvc/C1.Web.Mvc.MenuBase-1.AutoSelectOnFocus.html) property to **true**.

The **AutoSelectOnFocus** property sets a value that determines whether the first enabled item in the menu is automatically focused/selected in the dropdown. This provides appropriate navigation when accessibility tools are used. By default, the value of the AutoSelectOnFocus property is set to false.

The following image showcases the first item in the menu as selected and in focus.

![](https://cdn.mescius.io/document-site-files/images/9b6a6cfe-b8e8-42e9-8a04-da6cb7762977/images/menu-selectonfocus.png)

The following code showcases the use of the **AutoSelectOnFocus** property. This example uses the data and the code used in [Quick Start](/componentone/docs/mvc/online-mvc-core/WorkingwithControls/Input/Menu/MenuQuickStart) sample.

**View**

```razor
<c1-menu header="File" auto-select-on-focus="true" width="100px">
    <c1-menu-item header="New"></c1-menu-item>
    <c1-menu-item header="Open"></c1-menu-item>
    <c1-menu-item header="Save"></c1-menu-item>
    <c1-menu-item is-separator=true></c1-menu-item>
    <c1-menu-item header="Exit"></c1-menu-item>
</c1-menu>
```