Back to Devexpress

DxWindow.ShowAtAsync(Double, Double, CancellationToken) Method

blazor-devexpress-dot-blazor-dot-dxwindow-dot-showatasync-x28-system-dot-double-system-dot-double-system-dot-threading-dot-cancellationtoken-x29.md

latest2.3 KB
Original Source

DxWindow.ShowAtAsync(Double, Double, CancellationToken) Method

Asynchronously shows the Window at the specified coordinates.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public Task ShowAtAsync(
    double x,
    double y,
    CancellationToken token = default(CancellationToken)
)

Parameters

NameTypeDescription
xDouble

The X coordinate of the window’s top left corner.

| | y | Double |

The Y coordinate of the window’s top left corner.

|

Optional Parameters

NameTypeDefaultDescription
tokenCancellationTokennull

An object that propagates a cancellation notification.

|

Returns

TypeDescription
Task

An asynchronous operation that shows the Window.

|

Remarks

razor
<DxButton RenderStyle="ButtonRenderStyle.Secondary"
          Click="OnShowAtPositionClick">SHOW A WINDOW</DxButton>

<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;

    async Task OnShowAtPositionClick(MouseEventArgs args) {
        await Window.ShowAtAsync(args.ClientX, args.ClientY);
    }
}

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

Run Demo: Window - Show Options

See Also

DxWindow Class

DxWindow Members

DevExpress.Blazor Namespace