Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UIElement.MouseRightButtonUp Event

Occurs when the right mouse button is released while the mouse pointer is over a UIElement. However, this event will only be raised if a caller marks the preceding MouseRightButtonDown event as handled; see Remarks.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

public event MouseButtonEventHandler MouseRightButtonUp
<uiElement MouseRightButtonUp="eventhandler"/>

Use a handler based on MouseButtonEventHandler to handle this event. For more information on how to handle mouse events, see Mouse Support.

If a handler exists that processes the event data for MouseRightButtonDown, and that handler marks the MouseRightButtonDown event as handled, only then is the MouseRightButtonUp event raised. Otherwise, a client's right mouse button release does not generate an event.

If the mouse pointer is moved over another object when the button is released, the object that received the MouseRightButtonDown event will not necessarily receive the MouseRightButtonUp event.

Mouse capture is not a relevant concept for mouse right button clicks.

Macintosh client users generally can produce an equivalent of a right-click by pressing the Control key and pressing the mouse button. For more information see Silverlight Differences on Windows and Macintosh.

Routed Event Behavior

The MouseRightButtonUp event is a bubbling event. This means that if multiple MouseRightButtonUp event handlers are registered for a sequence of objects connected by parent-child relationships in the object tree, the event is received by each object in that relationship. The bubbling metaphor indicates that the event starts at the object that directly receives the input condition, and works its way up the object tree. For a bubbling event, the sender available to the event handler identifies the object where the event is handled, not necessarily the object that actually received the input condition that initiated the event. To get the object that initiated the event, use the OriginalSource value of the event's RoutedEventArgs event data.

MouseRightButtonUp and OnMouseRightButtonUp

Controls that inherit MouseRightButtonUp can provide handling for the event that acts as handler for all instances, by overriding the OnMouseRightButtonUp method. This might include marking the Handled value of the event as true, which has the effect of suppressing the MouseRightButtonUp event on any instance of the control (and potentially any subclass of the control). For more information, see OnMouseRightButtonUp.

Version Notes

Silverlight 3: This event is not available in Silverlight 3.

Silverlight 4: This event exists in Silverlight 4. However, you cannot use AddHandler to register for already-handled MouseRightButtonUp occurrences, because there is no public RoutedEvent identifier available for the event in Silverlight 4.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2014 Microsoft