blazor-devexpress-dot-blazor-dot-dxdropdown.md
Specifies whether the drop-down window is open.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public bool IsOpen { get; set; }
| Type | Description |
|---|---|
| Boolean |
true if the window is open; otherwise, false.
|
Implement two-way binding for the IsOpen property to open and close the drop-down window in code and update the property value when a user closes the window. The IsOpenChanged event occurs when the property value changes.
<DxButton Id="showDDbtton" Click="() => IsOpen = true">Show a drop-down window</DxButton>
<DxDropDown PositionTarget="#showDDbtton"
PositionMode="DropDownPositionMode.Bottom"
HorizontalOffset="120"
VerticalOffset="70"
Width="210px"
BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit."
@bind-IsOpen="@IsOpen">
</DxDropDown>
@code {
bool IsOpen { get; set; } = false;
}
You can handle the following events related to the IsOpen property’s changes:
The ShowAsync and CloseAsync methods allow you to show and close the drop-down window asynchronously.
See Also