Skip to main content

DxMenu.CloseMenuOnItemClick Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll


public bool? CloseMenuOnItemClick { get; set; }

Property Value

Type Default Description


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


The following property values are available:

Value Description
null In case of regular items, the menu closes.
In case of items with templated content, the menu does not close.
true The menu closes if a user clicks its item.
false 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" CloseMenuOnClick="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" />

Do Not Close Sub-Menus

See Also