Skip to main content

DropDownCloseReason Enum

Lists actions that close a drop-down window.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public enum DropDownCloseReason


Name Description

You set the IsOpen property to false, called the CloseAsync method, or sent the CloseCallback.


A user pressed Escape.


A user clicked outside the drop-down window’s boundaries. You can set the CloseOnOutsideClick property to false to disable this option.

Related API Members

The following properties accept/return DropDownCloseReason values:


The Closing event allows you to process close actions. The event argument’s CloseReason property identifies which action closes the window. The property returns one of the DropDownCloseReason enumeration values. You can set the Cancel property to true to cancel the action.

In the following example, the custom “OK“ button sends a close callback. On the server, this action is canceled until a user selects the checkbox in the footer. However, users can close the window in other ways: they can press Escape or click outside the window’s boundaries.

Blazor DropDown Close Events

<DxButton Id="showDDbtton" Click="() => IsOpen = true">Show Window</DxButton>
<DxDropDown Width="400"
            HeaderText="DevExpress EULA"
                The terms of our license are fully outlined/described in the Developer Express Inc End User
                License Agreement (EULA) included with our product installations. Before you can install and use
                a Developer Express Inc product, you must read, understand and accept the terms/conditions of
                our EULAs. <a target="" _blank"" rel="" noopener noreferrer"" href=""https: //"">More info...</a>
        <DxCheckBox style="margin-left: 0; margin-right: auto;" @bind-Checked="@EulaAccepted">
            I accept the terms of the EULA
        <DxButton RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="context.CloseCallback" />

@code {
    bool IsOpen { get; set; } = false;
    bool EulaAccepted { get; set; }

    void EulaClosing(DropDownClosingEventArgs args) {
        if (args.CloseReason == DropDownCloseReason.Programmatically) {
            args.Cancel = !EulaAccepted;
    void EulaClosed(DropDownClosedEventArgs args) {
        EulaAccepted = false;
See Also