This documentation is archived and is not being maintained.
MouseDevice Class
Visual Studio 2010
Represents a mouse device.
System::Object
System.Windows.Threading::DispatcherObject
System.Windows.Input::InputDevice
System.Windows.Input::MouseDevice
System.Windows.Threading::DispatcherObject
System.Windows.Input::InputDevice
System.Windows.Input::MouseDevice
Assembly: PresentationCore (in PresentationCore.dll)
The MouseDevice type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ActiveSource | Gets the PresentationSource that is reporting input for this device. (Overrides InputDevice::ActiveSource.) |
![]() | Captured | Gets the IInputElement that is captured by the mouse. |
![]() | DirectlyOver | Gets the element that the mouse pointer is directly over. |
![]() | Dispatcher | Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.) |
![]() | LeftButton | Gets the state of the left mouse button of this mouse device. |
![]() | MiddleButton | The state of the middle button of this mouse device. |
![]() | OverrideCursor | Gets or sets the cursor for the entire application. |
![]() | RightButton | Gets the state of the right button of this mouse device. |
![]() | Target | Gets the IInputElement that the input from this mouse device is sent to. (Overrides InputDevice::Target.) |
![]() | XButton1 | Gets the state of the first extended button on this mouse device. |
![]() | XButton2 | Gets the state of the second extended button of this mouse device. |
| Name | Description | |
|---|---|---|
![]() | Capture(IInputElement) | Captures mouse events to the specified element. |
![]() | Capture(IInputElement, CaptureMode) | Captures mouse input to the specified element using the specified CaptureMode. |
![]() | CheckAccess | Determines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.) |
![]() | 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 it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetButtonState | Gets the state of the specified mouse button. |
![]() | GetClientPosition() | Calculates the position of the mouse pointer, in client coordinates. |
![]() | GetClientPosition(PresentationSource) | Calculates the position of the mouse pointer, in client coordinates, in the specified PresentationSource. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetPosition | Gets the position of the mouse relative to a specified element. |
![]() | GetScreenPosition | Calculates the screen position of the mouse pointer. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | SetCursor | Sets the mouse pointer to the specified Cursor |
![]() | Synchronize | Forces the mouse to resynchronize. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | UpdateCursor | Forces the mouse cursor to update. |
![]() | VerifyAccess | Enforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.) |
The MouseDevice supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.
For mouse related input, use the Mouse class. The Mouse class represents the mouse to an application and provides methods, properties, and events that reflect the state of the mouse.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:
