Skip to main content

DxMenu.CloseMenuOnItemClick Property

Specifies whether to close sub-menus when you click their items.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.1.dll

NuGet Package: DevExpress.Blazor


public bool? CloseMenuOnItemClick { get; set; }

Property Value

Type Default Description
Nullable<Boolean> null

A value that specifies whether to close sub-menus when you click their items.


The following property values are available:




In case of regular items, the menu closes.

In case of items with templated content, the menu does not close.


The menu closes if a user clicks its item.


The menu does not close if a user clicks its item.

The code below sets the CloseMenuOnItemClick property to false. When a user clicks sub-items of the Products or Support items, the sub-menus do not close.

<div class="card w-auto">
    <DxMenu Title="DevExpress" CloseMenuOnItemClick="false">
            <DxMenuItem Text="Products" IconCssClass="oi oi-layers">
                    <DxMenuItem Text="Subscriptions / Packs" />
                    <DxMenuItem Text=".NET Windows Forms Components" />
                    <DxMenuItem Text="Reporting / Printing Suites" />
                    <DxMenuItem Text="VCL Components and Tools" />
                    <DxMenuItem Text="ASP.NET Components" />
            <DxMenuItem Text="Support" IconCssClass="oi oi-person">
                    <DxMenuItem Text="Knowledge Base" />
                    <DxMenuItem Text="Documentation" />
                    <DxMenuItem Text="Support Center" />
                    <DxMenuItem Text="Newsgroups" />
                    <DxMenuItem Text="Best Practices" />
See Also