Export (0) Print
Expand All
Expand Minimize

ContentElement::MouseRightButtonDown Event

Occurs when the right mouse button is pressed while the mouse pointer is over this element.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public:
virtual  event MouseButtonEventHandler^ MouseRightButtonDown {
	void add (MouseButtonEventHandler^ value);
	void remove (MouseButtonEventHandler^ value);
}
<object MouseRightButtonDown="MouseButtonEventHandler" .../>

Implements

IInputElement::MouseRightButtonDown

Identifier field

MouseRightButtonDownEvent

Routing strategy

Direct

Delegate

MouseButtonEventHandler

Although this Routed Events Overview seems to follow a bubbling route through an element tree, it actually is a direct routed event that is raised and reraised along the element tree by each ContentElement.

This event is one of several related events that report the mouse-button specifics of an underlying Mouse::MouseDown event, which is an attached event that is processed by each element along an event route.

The arguments of this event expose the arguments of the underlying Mouse::MouseDown event. 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.

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. For more advanced scenarios, such as checking for states of non-standard buttons, you might need to use the APIs on the Mouse class rather than those on ContentElement.

Right button mouse events frequently have native handling in application scenarios. For instance, a right mouse button down might display a context menu. See ContextMenu Overview.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft