DxWindow.MoveAsync(Point, CancellationToken) Method
Asynchronously moves the Window to the specified point.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public Task MoveAsync(
Point leftTopCornerPoint,
CancellationToken token = default(CancellationToken)
)
Parameters
Name | Type | Description |
---|---|---|
leftTopCornerPoint | Point | The new X and Y coordinates of the Window’s top left corner. |
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
token | CancellationToken | null | An object that propagates a cancellation notification. |
Returns
Type | Description |
---|---|
Task | An asynchronous operation that moves the Window. |
Remarks
The following code snippet moves the Window to the speicified coordinates.
<DxButton RenderStyle="ButtonRenderStyle.Secondary"
Click="() => WindowVisible = !WindowVisible">SHOW A WINDOW</DxButton>
<DxButton RenderStyle="ButtonRenderStyle.Secondary"
Click="OnMoveAtPoint">MOVE THE WINDOW TO A NEW POSITION</DxButton>
<DxWindow @ref=Window
@bind-Visible=WindowVisible
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;
bool WindowVisible { get; set; } = false;
async Task OnMoveAtPoint() {
await Window.MoveAsync(150, 150);
}
}
See Also