Skip to main content
All docs
V26.1
  • DxDropDown.InitializedTask Property

    The task that allows you to wait until the drop-down window is initialized.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v26.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public Task InitializedTask { get; }

    Property Value

    Type Description
    Task

    The task that is completed when the window is initialized.

    Remarks

    Run the task to make sure that the drop-down window is initialized.

    <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