MouseEventArgs
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Provides data for mouse-related events.
Syntax Notes
MouseEventArgs is obtained as input for your own MouseEnter, MouseLeave, MouseLeftButtonDown, MouseLeftButtonUp, and KeyUp event handlers.
Methods
Equals, FindName (DependencyObject), GetHost, GetPosition, GetStylusInfo, GetStylusPoints, GetValue, SetValue
Properties
Ctrl (MouseEventArgs), Name (DependencyObject), Shift (MouseEventArgs), Source (Silverlight 2)
Remarks
MouseEventArgs is used with the following events: MouseEnter, MouseLeave, MouseLeftButtonDown, MouseLeftButtonUp, and KeyUp.
In addition to properties, MouseEventArgs also has several specialized methods, including GetPosition. You can obtain the coordinates where a mouse event occurred 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 more information on basic concepts, see Mouse Support. Note that the Mouse Support topic is written primarily for users of the managed API, and may not have code examples or specific information that address the JavaScript API scenarios.