UIElement.PreviewMouseWheel UIElement.PreviewMouseWheel UIElement.PreviewMouseWheel UIElement.PreviewMouseWheel Event

定义

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

public:
 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附加事件的别名, 因此当继承PreviewMouseMove为基元素时UIElement , 它是类成员列表的一部分。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

适用于