Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 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

    DxWindow.ShowAtAsync(ElementReference, CancellationToken) Method

    Asynchronously shows the Window over the element specified by ElementReference.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    #Declaration

    C#
    public Task ShowAtAsync(
        ElementReference elementReference,
        CancellationToken token = default(CancellationToken)
    )

    #Parameters

    Name Type Description
    elementReference ElementReference

    A reference to a rendered element.

    #Optional Parameters

    Name Type Default Description
    token CancellationToken null

    An object that propagates a cancellation notification.

    #Returns

    Type Description
    Task

    An asynchronous operation that shows the Window.

    #Remarks

    Razor
    <DxButton RenderStyle="ButtonRenderStyle.Secondary"
              Click="OnShowAtElementReferenceClick">SHOW A WINDOW</DxButton>
    <div @ref=@divRef style="width: 100px; height: 100px; background: #ff0000;"></div>
    
    <DxWindow @ref=Window 
              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 {
        DxWindow Window;
        ElementReference divRef;
    
        async Task OnShowAtElementReferenceClick(MouseEventArgs args) {
            await Window.ShowAtAsync(divRef);
        }
    }
    

    You can also use other ShowAtAsync method overloads to show the window.

    Run Demo: Window - Show Options

    See Also