UIElement.PreviewMouseDown UIElement.PreviewMouseDown UIElement.PreviewMouseDown UIElement.PreviewMouseDown Event

定義

指標在此元素上方且按下任何滑鼠按鈕時發生。Occurs when any mouse button is pressed while the pointer is over this element.

public:
 event System::Windows::Input::MouseButtonEventHandler ^ PreviewMouseDown;
public event System.Windows.Input.MouseButtonEventHandler PreviewMouseDown;
member this.PreviewMouseDown : System.Windows.Input.MouseButtonEventHandler 
Public Custom Event PreviewMouseDown As MouseButtonEventHandler 

備註

此事件建立的別名Mouse.PreviewMouseDown附加事件,此類別中,以便PreviewMouseDown屬於類別的成員清單時UIElement繼承為基底的項目。This event creates an alias for the Mouse.PreviewMouseDown attached event for this class, so that PreviewMouseDown is part of the class members list when UIElement is inherited as a base element. 附加至事件處理常式PreviewMouseDown事件會附加至基礎Mouse.PreviewMouseDown附加事件,並接收相同的事件資料執行個體。Event handlers that are attached to the PreviewMouseDown event are attached to the underlying Mouse.PreviewMouseDown attached event and receive the same event data instance.

PreviewMouseDown通常就會引發事件一起PreviewMouseLeftButtonDownPreviewMouseRightButtonDown,對應到其中的兩個標準的滑鼠按鈕按下。The PreviewMouseDown event is often raised together with either PreviewMouseLeftButtonDown or PreviewMouseRightButtonDown, which correspond to a press of one of the two standard mouse buttons. PreviewMouseLeftButtonDownPreviewMouseRightButtonDown也是路由的事件,但它們是直接路由的事件,並適當按鈕特有的事件引發時Mouse.PreviewMouseDown事件到達事件路由中的此項目。PreviewMouseLeftButtonDown and PreviewMouseRightButtonDown are also routed events, but they are direct routed events, and the appropriate button-specific event is raised when the Mouse.PreviewMouseDown event reaches this element along the event route. 請參閱備註PreviewMouseLeftButtonDownPreviewMouseRightButtonDownSee Remarks for PreviewMouseLeftButtonDown or PreviewMouseRightButtonDown.

路由事件資訊Routed Event Information

識別項欄位Identifier field PreviewMouseDownEvent
路由策略Routing strategy 通道Tunneling
Delegate - 委派Delegate MouseButtonEventHandler

適用於