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.IsInitialized Property

Gets whether the DropDown component is initialized.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public bool IsInitialized { get; }

#Property Value

Type Description
Boolean

true if the component is initialized; otherwise, false.

#Remarks

The drop-down window 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 Initialized event fires.

To track the initialization state from code, use the IsInitialized property. You can run the InitializedTask task to wait until the drop-down window is initialized.

Razor
<DxButton Text="Show" Click="ShowWindow" />
<DxButton Text="Hide" Click="HideWindow" />

<DxDropDown @ref="ddWindow"
            Width="400"
            BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit.">
</DxDropDown>

@code {
    DxDropDown ddWindow { get; set; }

    async Task ShowWindow(MouseEventArgs args) {
        if (ddWindow.IsInitialized)
            await ddWindow.ShowAsync();
        else {
            await ddWindow.InitializedTask;
            await ddWindow.ShowAsync();
        }
    }
    async Task HideWindow(MouseEventArgs args) {
        await ddWindow.CloseAsync();
    }
}
See Also