Skip to main content
A newer version of this page is available. .

WindowDragCompletedEventArgs Class

Contains data for the DragCompleted event.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public class WindowDragCompletedEventArgs :
    EventArgs

Remarks

When the AllowDrag property is set to true, users can drag the Window. Handle the DragCompleted event to be notified when a user finishes dragging the window. The event argument’s End parameter returns the new window position.

<DxButton RenderStyle="ButtonRenderStyle.Secondary" 
          Click="() => windowVisible = !windowVisible">SHOW A WINDOW</DxButton>
<DxWindow @bind-Visible=windowVisible
          PositionX="positionX"
          PositionY="positionY" 
          AllowDrag=true
          DragCompleted="OnWindowDragCompleted"
          ShowCloseButton="true"
          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 {
    int positionX = 250, positionY = 250;
    bool windowVisible;
    void OnWindowDragCompleted(WindowDragCompletedEventArgs args) {
        (positionX, positionY) = (args.End.X, args.End.Y);
    }
}

Run Demo: Window - Dragging

Inheritance

Object
EventArgs
WindowDragCompletedEventArgs
See Also