DxPopup.IsInitialized Property

Gets whether the Popup component is initialized.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll


public bool IsInitialized { get; }

Property Value

Type Description

true if the component is initialized; otherwise, false.


The Popup cannot be shown until the component is initialized. The initialization starts after the component is rendered for the first time. Once this task is completed, the Created event fires.

To track the initialization state from code, use the IsInitialized property. For example, you can check this property value before you call the ShowAsync(CancellationToken) method.

@inject IJSRuntime JsRuntime

<DxButton RenderStyle="ButtonRenderStyle.Primary" Text="Show" Click="ShowClick" />

<DxPopup @bind-Visible="@PopupVisible"
         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."
        <DxButton RenderStyle="ButtonRenderStyle.Primary" Text="Close" Click="CloseClick" />

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

    async Task ShowClick(MouseEventArgs args)
        if (Popup.IsInitialized)
            await Popup.ShowAsync();
            await JsRuntime.InvokeVoidAsync("alert", "The component has not been initialized yet. Please try later.");

    async Task CloseClick(MouseEventArgs args)
        await Popup.CloseAsync();
See Also