DxDropDownButton.CloseDropDownOnItemClick Property
Specifies whether to close drop-down menus when a user clicks their items.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v26.1.dll
Declaration
[DefaultValue(true)]
[Parameter]
public bool CloseDropDownOnItemClick { get; set; }
Property Value
| Type | Default | Description |
|---|---|---|
| Boolean | true |
|
Remarks
When a user clicks a drop-down list item, the drop-down menu closes. In case of items with templates, the menu does not close.
The following code snippet keeps drop-down menus open after a user clicks their items:
@using DevExpress.Images.Blazor
<DxDropDownButton RenderStyle="ButtonRenderStyle.Secondary"
Text="Clipboard"
IconUrl="@Icon.Clipboard"
CloseDropDownOnItemClick="false">
<Items>
<DxDropDownButtonItem Text="Cut" IconUrl="@Icon.Cut" />
<DxDropDownButtonItem Text="Copy" IconUrl="@Icon.Copy" />
<DxDropDownButtonItem Text="Paste" IconUrl="@Icon.ClipboardPaste" />
<DxDropDownButtonItem Text="Paste Special" BeginGroup="true">
<Items>
<DxDropDownButtonItem Text="Paste Text Only" />
<DxDropDownButtonItem Text="Paste Picture" Enabled="false" />
<DxDropDownButtonItem Text="Paste as Hyperlink" />
</Items>
</DxDropDownButtonItem>
</Items>
</DxDropDownButton>
See Also