UIElement.PreviewMouseRightButtonUp UIElement.PreviewMouseRightButtonUp UIElement.PreviewMouseRightButtonUp UIElement.PreviewMouseRightButtonUp Event

定義

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

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

實作

備註

雖然這路由的事件似乎會遵循通道路由項目樹狀結構中,它實際上是直接路由的事件的引發並由每個項目樹狀結構中沿著 reraised UIElementAlthough this routed event 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 UIElement.

此事件會報告滑鼠按鈕的細節有基礎的多個相關事件的其中一個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.

此事件的事件資料會公開事件資料的基礎Mouse.PreviewMouseUp事件。The event data of this event exposes the event data 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. 如果您將標示PreviewMouseRightButtonUp處理,您基本上將標示Mouse.PreviewMouseUp處理路由中的所有進一步的接聽程式和所有相關事件。If you mark PreviewMouseRightButtonUp handled, you are essentially marking Mouse.PreviewMouseUp handled for all further listeners along the route, and on all related events.

就概念而言,將此事件 (和其他的滑鼠按鍵事件,對於UIElement) 是滑鼠 「 服務 」 (使用所提供的服務定義Mouse類別)。Conceptually, think of this event (and other mouse-button events on UIElement) 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類別,而這些非上UIElementFor 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 UIElement.

路由事件資訊Routed Event Information

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

適用於

另請參閱