Mouse.PreviewMouseWheel Mouse.PreviewMouseWheel Mouse.PreviewMouseWheel Attached Event

定义

在鼠标滚轮转动时发生。Occurs when the mouse wheel rotates.

see AddPreviewMouseWheelHandler, and RemovePreviewMouseWheelHandler
see AddPreviewMouseWheelHandler, and RemovePreviewMouseWheelHandler
see AddPreviewMouseWheelHandler, and RemovePreviewMouseWheelHandler

注解

焦点或鼠标捕获优先于鼠标指针所在的位置;因此, 如果从焦点或捕获的元素接收此事件, 则鼠标指针实际上可能位于另一个元素上。Focus or mouse capture take precedence over where the mouse pointer is; therefore, if you receive this event from a focused or captured element, the mouse pointer might in fact be over another element at the time.

这是一个附加事件。This is an attached event. WPFWPF将附加事件作为路由事件实现。implements attached events as routed events. 附加事件本质上是XAMLXAML一种用于引用事件的语言概念, 这些事件可在未定义该事件的对象WPFWPF上进行处理, 后者通过同时启用事件来遍历路由。Attached events are fundamentally a XAMLXAML language concept for referencing events that can be handled on objects that do not define that event, which WPFWPF expands upon by also enabling the event to traverse a route. 附加事件在代码中没有直接处理语法;若要在代码中附加路由事件的处理程序, 请使用指定的 Add * 处理程序方法。Attached events do not have a direct handling syntax in code; to attach handlers for a routed event in code, you use a designated Add*Handler method. 有关详细信息, 请参阅附加事件概述For details, see Attached Events Overview.

路由事件信息Routed Event Information

标识符字段Identifier field PreviewMouseWheelEvent
路由策略Routing strategy 建立Tunneling
委托Delegate MouseWheelEventHandler

适用于