ContentElement.PreviewMouseLeftButtonUp ContentElement.PreviewMouseLeftButtonUp ContentElement.PreviewMouseLeftButtonUp ContentElement.PreviewMouseLeftButtonUp Event

定義

滑鼠指標在此元素上方且放開滑鼠左按鈕時發生。Occurs when the left mouse button is released while the mouse pointer is over this element.

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

實作

備註

雖然這路由事件概觀似乎會遵循通道路由項目樹狀結構中,它實際上是直接路由的事件的引發並由每個項目樹狀結構中沿著 reraised ContentElementAlthough this Routed Events Overview seems to follow a tunneling route through an element tree, it actually is a direct routed event that is raised and reraised along the element tree by each ContentElement.

此事件會報告滑鼠按鈕的細節有基礎的多個相關事件的其中一個Mouse.PreviewMouseUp事件,這是附加的事件處理的事件路由的每個項目。This event is one of several related events that report the mouse-button specifics of an underlying Mouse.PreviewMouseUp event, which is an attached event that is processed by each element along an event route.

此事件的引數公開 (expose) 的引數的基礎Mouse.PreviewMouseUp事件。The arguments of this event expose the arguments of the underlying Mouse.PreviewMouseUp event. 如果該事件標示為已處理此事件路由,仍然會引發滑鼠按鈕的特定事件;不過,必須新增的滑鼠按鈕的特定事件的處理常式藉由明確呼叫AddHandler,選項來處理已標示為已處理的事件、 事件接聽程式,才能使用。If that event is marked as handled along the event route, the mouse-button specific events are still raised; however, handlers of the mouse-button specific events must be added by explicitly calling AddHandler, with the option to handle events that are already marked as handled, in order to be listeners to the event.

就概念而言,將此事件 (和其他的滑鼠按鍵事件,對於ContentElement) 是滑鼠 「 服務 」 (使用所提供的服務定義Mouse類別)。Conceptually, think of this event (and other mouse-button events on ContentElement) to be a mouse "service" (with the service definition provided by the Mouse class). 事件會新增不需要檢查原始的滑鼠事件,事件資料中的滑鼠按鈕狀態 (左右,上下按鈕控制項) 的便利性。The event adds the convenience of not needing to check the mouse button states (left-right, up-down) of the original mouse events in the event data. 針對更進階的案例,例如檢查狀態的標準按鈕,您可能需要使用APIAPIsMouse類別,而這些非上ContentElementFor more advanced scenarios, such as checking for states of non-standard buttons, you might need to use the APIAPIs on the Mouse class rather than those on ContentElement.

路由事件資訊Routed Event Information

識別項欄位Identifier field PreviewMouseLeftButtonUpEvent
路由策略Routing strategy 直接Direct
Delegate - 委派Delegate MouseButtonEventHandler

適用於