MouseDevice
MouseDevice
MouseDevice
MouseDevice
Class
Definition
Supports the ability to identify and track connected mouse devices.
public : sealed class MouseDevice : IMouseDevicepublic sealed class MouseDevice : IMouseDevicePublic NotInheritable Class MouseDevice Implements IMouseDevice// You can use this class in JavaScript.
- Attributes
Windows 10 requirements
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
The Device Capabilities Sample demonstrates how to detect the presence of input devices and retrieve the capabilities and attributes of each device.
Note
: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).
Methods
GetForCurrentView() GetForCurrentView() GetForCurrentView() GetForCurrentView()
Retrieves the mouse device that is associated with the current view.
public : static MouseDevice GetForCurrentView()public static MouseDevice GetForCurrentView()Public Static Function GetForCurrentView() As MouseDevice// You can use this method in JavaScript.
Returns
The mouse device.
Events
MouseMoved MouseMoved MouseMoved MouseMoved
Occurs when the mouse pointer is moved.
public : event TypedEventHandler MouseMoved<MouseDevice, MouseEventArgs>public event TypedEventHandler MouseMoved<MouseDevice, MouseEventArgs>Public Event MouseMoved<MouseDevice, MouseEventArgs>// You can use this event in JavaScript.