Skip to main content
All docs
V24.2

DxDropDownButtonBase.DropDownVisibleChanged Event

Fires when the visibility of the target element’s drop-down menu/window is changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<bool> DropDownVisibleChanged { get; set; }

Parameters

Type Description
Boolean

A new value of the DropDownVisible property.

Remarks

Handle the DropDownVisibleChanged event to respond to the DropDownVisible property change.

The following components raise the DropDownVisibleChanged event:

DxDropDownButton
A toggleable button that reveals a drop-down element with a list of commands or custom content.
DxSplitButton
A composite control that consists of a primary button and a toggleable secondary button that reveals a drop-down element.
DxDropDownButtonItem
Defines a drop-down list item. Used in DxDropDownButton or DxSplitButton.

Example

The following code snippet displays the current visibility state of the DxDropDownButton component’ drop-down menu:

<p>Is menu expanded - @IsDropDownVisible</p>

<DxDropDownButton Text="Blazor Components"
                  RenderStyleMode="ButtonRenderStyleMode.Outline"
                  DropDownVisible="@IsDropDownVisible"
                  DropDownVisibleChanged="OnDropDownVisibleChanged">
    <Items>
        <DxDropDownButtonItem Text="Documentation"
                              NavigateUrl="https://docs.devexpress.com/Blazor/400725/blazor-components" />
        <DxDropDownButtonItem Text="Demos"
                              NavigateUrl="https://demos.devexpress.com/blazor/" />
    </Items>
</DxDropDownButton>

@code {
    bool IsDropDownVisible = false;

    void OnDropDownVisibleChanged(bool isVisible) {
        IsDropDownVisible = isVisible;
    }
}
See Also