Provides data for mouse-related events that do not specifically involve mouse buttons, for example UIElement.MouseMove.
Assembly: System.Windows (in System.Windows.dll)
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetPosition||Returns the x- and y-coordinates of the mouse pointer position, optionally evaluated against a coordinate origin of a supplied UIElement.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
This event data class is used with the following mouse events.
Note that events that specifically deal with mouse button events use a different event data class, MouseButtonEventArgs. Events that deal with the mouse wheel use MouseWheelEventArgs. MouseButtonEventArgs and MouseWheelEventArgs both derive from . Therefore, you can use the shared API (MouseEventArgs.GetPosition or MouseEventArgs.StylusDevice) for any Silverlight mouse event through event handling and the event data.
In the WPF implementation of MouseEventArgs, you could check properties to determine mouse button state even if the event was not a button-related event, and also could query for the underlying device. Neither of these features are supported in the Silverlight 5 implementation of .
The most relevant member of is GetPosition, which is a method, not a property. Particularly for a mouse button event, or for cases where the mouse is captured, it is often useful to know the exact mouse pointer position at time of the event. GetPosition returns that position relative to the Silverlight coordinate space, or optionally against the specific coordinate space of a supplied reference element.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.