WPF RoutedEvents 正在由...处理?
我在 WPF 中有一个 3D 应用程序,它基本上应该在触发 MouseWheel 事件时放大和缩小。 我尝试订阅所有可能的内容,但找不到正在处理它的内容。
有没有办法找出是什么? 或者有没有一种方法可以不处理该事件,或者让包含的 UIElement 在处理该事件之前/之后到达该事件?
I have a 3D application in WPF which basically is supposed to zoom in and out as the MouseWheel event is fired. I have attempted to subscribe everything possible, but can't find what it is which is handling it.
Is there a way to find out what is? Or is there a way to have the event not handled, or for an encompassing UIElement to get to this event before/after the one dealing with it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您希望在其他人已经处理该事件的情况下被调用,请尝试使用
UIElement.AddHandled(RoulatedEvent, bool)
函数订阅该事件。 传入true
作为第二个参数来调用,即使事件已被处理。您还可以尝试订阅
PreviewMouseWheel
事件,以便在该事件 隧道。If you want to get called even though someone else has already handled the event, try subscribing to the event using the
UIElement.AddHandled(RoutedEvent, bool)
function. Pass intrue
as the second argument to get called even if the event has been handled.You can also try subscribing to the
PreviewMouseWheel
event to get called when the event is tunneling.