blazor-devexpress-dot-blazor-dot-dxwindow.md
Specifies whether the Window is visible.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public bool Visible { get; set; }
| Type | Description |
|---|---|
| Boolean |
true if the Window is displayed; otherwise, false.
|
Implement two-way binding for the Visible property to show the Window in code and update the property value when a user closes the Window. The VisibleChanged event occurs when the property value changes.
<DxButton RenderStyle="ButtonRenderStyle.Secondary"
Click="() => WindowVisible = !WindowVisible">SHOW A WINDOW</DxButton>
<DxWindow @bind-Visible=WindowVisible
HeaderText="Header"
BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sit amet metus vel
nisi blandit tincidunt vel efficitur purus. Nunc nec turpis tempus, accumsan orci auctor,
imperdiet mauris. Fusce id purus magna."
Width="max(25vw, 250px)">
</DxWindow>
@code {
bool WindowVisible { get; set; } = false;
}
You can handle the following events related to the Visible property’s changes:
The ShowAsync and CloseAsync methods allow you to show and close the Window asynchronously.
See Also