December 03, 2013
Occurs when a UIElement is tapped.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
The event is raised when a UIElement is tapped. When the user’s finger is lifted off the touchscreen, the MouseLeftButtonUp event is raised. However, if the finger is moved over another object when the finger is lifted, the UIElement that received the event will only receive the MouseLeftButtonUp event if that UI element has explicitly captured the touch event.
Touch capture is a concept whereby an object can continue to receive touch events, even if the finger is no longer over the object's bounding area. In order to request touch capture, the finger must be physically touching the screen. Therefore, a common point in code to call CaptureMouse is from within the handler for a particular UIElement. For more information on touch capture and scenarios where it is useful, see Quickstart: Touch input for Windows Phone.
Routed Event Behavior
The event is a bubbling event. This means that if multiple 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.
MouseLeftButtonDown and OnMouseLeftButtonDown
Controls that inherit can provide handling for the event that acts as handler for all instances, by overriding the OnMouseLeftButtonDown method. This might include marking the Handled value of the event as true, which has the effect of suppressing the event on any instance of the control (and potentially any subclass of the control). The implementation also sets Handled, which generally prevents touch actions from being reported as a event that could be handled by a button instance. This is done because the Click event is more meaningful for the control's intended purpose. For more information, see OnMouseLeftButtonDown.
You can also register handlers such that they are invoked even for already-handled routed events. For more information, see AddHandler.