UIElement.MouseWheel 事件

定义

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

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

实现

注解

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

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

路由事件信息Routed Event Information

标识符字段Identifier field MouseWheelEvent
路由策略Routing strategy 冒泡Bubbling
委托Delegate MouseWheelEventHandler

适用于