Mouse Class

Represents the mouse device to a specific thread.

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

public static class Mouse
You cannot directly create an instance of this class in XAML.

The Mouse class provides mouse related events, methods and, properties which provide information regarding the state of the mouse.

Each event that Mouse defines as an attached event is also re-exposed by the base element classes UIElement and ContentElement as a new routed event. Generally, it is more convenient to handle mouse events for an application on UIElement and ContentElement, rather than using the Mouse events. For details, see Input Overview.

The static members of the Mouse class delegate to the primary MouseDevice of the calling thread's input manager.

System.Object
  System.Windows.Input.Mouse

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft