Share via


MouseEventArgs Object

Provides data for mouse related events.

XAML
Cannot be used in XAML.
Scripting
Obtained as arguments for certain event handlers.

Properties

Ctrl, Name, Shift

Methods

Equals, FindName, GetHost, GetPosition, GetStylusInfo, GetStylusPoints, GetValue, SetValue

Remarks

MouseEventArgs is used with the following events: MouseEnter, MouseLeave, MouseLeftButtonDown, MouseLeftButtonUp, and MouseMove.

In addition to properties, MouseEventArgs also has several specialized methods including GetPosition. The coordinates where the mouse event occurred are obtained by calling the GetPosition method on the MouseEventArgs object, rather than by getting a value for "X" or "Y" properties of MouseEventArgs. This is because GetPosition provides the ability to get a coordinate offset from a specified object, which can be useful for clarifying the coordinate reference frame for a particular sender of the event. For details, see Silverlight Mouse Support.

See Also

Silverlight Mouse Support
KeyboardEventArgs