Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxDropDown.IsOpenChanged Event

Fires when the DropDown opens or closes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback<bool> IsOpenChanged { get; set; }

#Parameters

Type Description
Boolean

A new value of the IsOpen property.

#Remarks

The IsOpenChanged event occurs when the IsOpen property value is changed. For instance, it fires when a user closes the window or you call the ShowAsync and CloseAsync methods.

Razor
<DxButton Id="show-dropdown" Click="() => IsOpen = !IsOpen">Show a drop-down window</DxButton>
<DxDropDown IsOpen="@IsOpen" IsOpenChanged="OnIsOpenChanged" PositionTarget="#show-dropdown"
            Width="400" BodyText="Lorem ipsum dolor sit amet.">
</DxDropDown>

@code {
    bool IsOpen { get; set; } = false;
    async Task OnIsOpenChanged (bool isOpen) {
      // your code
    }
}
See Also