Export (0) Print
Expand All

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

Community Additions

© 2015 Microsoft