开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜