DxPopup.Visible Property

Specifies whether the Popup is visible.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

Declaration

[Parameter]
public bool Visible { get; set; }

Property Value

Type Description
Boolean

true if the Popup is displayed; otherwise, false.

Remarks

Implement two-way binding for the Visible property to show the Popup in code and update the property value when a user closes the Popup. The VisibleChanged event occurs when the property value changes.

<div @onclick="@(() => PopupVisible = true)">
    <p>CLICK TO SHOW A POP-UP WINDOW</p>
</div>

<DxPopup @bind-Visible="@PopupVisible"
         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." />

@code {
    bool PopupVisible { get; set; } = false;
}

Run Demo: Popup - Overview

You can handle the following events related to the Visible property’s changes:

  • Showing - Fires before the Popup is displayed and allows you to cancel this action.
  • Shown - Fires after the Popup is displayed.
  • Closing - Fires before the Popup is closed and allows you to cancel this action.
  • Closed - Fires after the Popup is closed.

The ShowAsync and CloseAsync methods allow you to show and close the Popup asynchronously.

See Also