MouseLeftButtonUp 事件

UIElement.MouseLeftButtonUp 事件

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

命名空间: System.Windows
程序集: PresentationCore(在 presentationcore.dll 中)
XML 命名空间:

public event MouseButtonEventHandler MouseLeftButtonUp
/** @event */
public final void add_MouseLeftButtonUp (MouseButtonEventHandler value)

/** @event */
public final void remove_MouseLeftButtonUp (MouseButtonEventHandler value)

在 JScript 中,可处理由类定义的事件,但无法定义自己的事件。
<object MouseLeftButtonUp="MouseButtonEventHandler" .../>

Identifier field


Routing strategy




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 Vista、Microsoft Windows XP SP2 和 Windows Server 2003 SP1 支持 Microsoft .NET Framework 3.0。

.NET Framework



© 2016 Microsoft