DragMove not working when quickly dragging?
I have an application that can moved by dragging the title bar with the typical pattern using DragMove:
private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
DragMove();
}
It works fine, but only if I click in a spot, and then drag. If I click while dragging my mouse over th开发者_C百科e title bar it doesn't move.
Is there another event than MouseLeftButtonDown I need to hook to?
Try calling MyWindow.CaptureMouse() in the MouseLeftButtonDown event handler and then calling MyWindow.ReleaseMouseCapture() in the MouseLeftButtonUp event handler.
精彩评论