WPF RepeatButton MouseUp

与世无争的帅哥 提交于 2019-12-04 12:16:51

It appears that the repeat button is marking the event as handled internally. You can use the PreviewMouseLeftButtonUp tunneling event to catch the event before RepeatButton marks it as handled:

<RepeatButton x:Name="bob" PreviewMouseLeftButtonUp="bob_MouseUp" >
   Repeatinator!!
</RepeatButton>

Without looking at code it is kind of tough, but an initial suggestion is to set handled to true in your mousemove method.

private void mouseMove(object sender, MouseEventArgs e)
{
//do everything you need to, then add this line at the end
e.Handled = true;
}

This should allow the previewMouseButton events to be fired.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!