Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MouseEventArgs Object

Provides data for mouse related events.

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


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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.