UIElement.PreviewMouseWheel 事件
定義
滑鼠指標在此元素上方且使用者滾動滑鼠滾輪時發生。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 |
對應的反升事件為 MouseWheel 。The corresponding bubbling event is MouseWheel.
OnPreviewMouseWheel在衍生類別中覆寫以執行這個事件的類別處理。Override OnPreviewMouseWheel to implement class handling for this event in derived classes.