DragMove not working with fast drag and drop?

I have an application that can be moved by dragging the title bar using a typical template using DragMove:

private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
    DragMove();
}

It works fine, but only if I am in place and then drag. If I click by dragging the mouse over the title bar, it does not move.

Is there any other event than MouseLeftButtonDown Do I need to connect?

+3
source share
1 answer

Try calling MyWindow.CaptureMouse () in the MouseLeftButtonDown event handler, and then call MyWindow.ReleaseMouseCapture () in the MouseLeftButtonUp event handler.

0
source

Source: https://habr.com/ru/post/1778434/


All Articles