UIElement.PreviewMouseWheel 事件


在鼠标指针位于此元素上并且用户滚动鼠标滚轮时发生。Occurs when the user rotates the mouse wheel while the mouse pointer is over this element.

 virtual event System::Windows::Input::MouseWheelEventHandler ^ PreviewMouseWheel;
public event System.Windows.Input.MouseWheelEventHandler PreviewMouseWheel;
member this.PreviewMouseWheel : System.Windows.Input.MouseWheelEventHandler 
Public Custom Event PreviewMouseWheel As MouseWheelEventHandler 





焦点或鼠标捕获优先于鼠标指针所在的位置;因此,如果从焦点或捕获的元素接收此事件,则鼠标指针实际上可能位于另一个元素上。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 actually be over another element.

此事件将为 Mouse.PreviewMouseWheel 此类创建附加事件的别名,因此 PreviewMouseMoveUIElement 继承为基元素时,它是类成员列表的一部分。This event creates an alias for the Mouse.PreviewMouseWheel attached event for this class, so that PreviewMouseMove is part of the class members list when UIElement is inherited as a base element. 附加到事件的事件处理程序 PreviewMouseMove 附加到基础 Mouse.PreviewMouseWheel 附加事件,并接收相同的事件数据实例。Event handlers that are attached to the PreviewMouseMove event are attached to the underlying Mouse.PreviewMouseWheel attached event and receive the same event data instance.

路由事件信息Routed Event Information

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