Skip to main content

DxMenuItem.CloseMenuOnClick Property

Specifies whether to close a sub-menu when you click the item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public bool? CloseMenuOnClick { get; set; }

Property Value

Type Default Description
Nullable<Boolean> null

A value that specifies whether to close a sub-menu when you click the item.


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 CloseMenuOnClick property to false for the Best Practices item. When a user selects this item, the Support menu does not close.

<div class="card w-auto">
    <DxMenu Title="DevExpress">
            <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" CloseMenuOnClick="false" />
See Also