Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
UIElement Class
UIElement Events
 MouseLeftButtonUp Event

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
UIElement..::.MouseLeftButtonUp Event

Occurs when the left mouse button is released while the mouse pointer is over this element.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/xaml/presentation
Visual Basic (Declaration)
Public Event MouseLeftButtonUp As MouseButtonEventHandler
Visual Basic (Usage)
Dim instance As UIElement
Dim handler As MouseButtonEventHandler

AddHandler instance.MouseLeftButtonUp, handler
C#
public event MouseButtonEventHandler MouseLeftButtonUp
Visual C++
public:
virtual  event MouseButtonEventHandler^ MouseLeftButtonUp {
    void add (MouseButtonEventHandler^ value);
    void remove (MouseButtonEventHandler^ value);
}
JScript
JScript does not support events.
XAML Attribute Usage
<object MouseLeftButtonUp="MouseButtonEventHandler" .../>

Implements

IInputElement..::.MouseLeftButtonUp

Identifier field

MouseLeftButtonUpEvent

Routing strategy

Direct

Delegate

MouseButtonEventHandler

Although this routed event 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 UIElement.

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

The event data of this event exposes the event data of the underlying Mouse..::.MouseUp 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. If you mark MouseLeftButtonUp handled, you are essentially marking Mouse..::.MouseUp handled for all further listeners along the route, and on all related events.

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. 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 UIElement.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker