ContentElement.PreviewMouseDown 事件

定義

指標在此元素上方且按下任何滑鼠按鈕時發生。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 附加事件的別名,因此,當 ContentElement 繼承為基底專案時,PreviewMouseDown 就是類別成員清單的一部分。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 ContentElement 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. 請參閱 PreviewMouseLeftButtonDownPreviewMouseRightButtonDown的備註。See Remarks for PreviewMouseLeftButtonDown or PreviewMouseRightButtonDown.

路由事件資訊Routed Event Information

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

適用於