MouseEventArgs.MouseDevice Property


Gets the mouse device associated with this event.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public MouseDevice MouseDevice { get; }

Property Value

Type: System.Windows.Input.MouseDevice

The mouse device associated with this event. There is no default value.

The Mouse class provides additional properties and methods for determining the state of the mouse.

The following example gets the MouseDevice associated with an input event.

MouseDevice mouseDevice = e.MouseDevice;

.NET Framework
Available since 3.0
Return to top