MouseDevice Class
TOC
Collapse the table of content
Expand the table of content

MouseDevice Class

 

Represents a mouse device.

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


public abstract class MouseDevice : InputDevice

NameDescription
System_CAPS_pubpropertyActiveSource

Gets the PresentationSource that is reporting input for this device.(Overrides InputDevice.ActiveSource.)

System_CAPS_pubpropertyCaptured

Gets the IInputElement that is captured by the mouse.

System_CAPS_pubpropertyDirectlyOver

Gets the element that the mouse pointer is directly over.

System_CAPS_pubpropertyDispatcher

Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)

System_CAPS_pubpropertyLeftButton

Gets the state of the left mouse button of this mouse device.

System_CAPS_pubpropertyMiddleButton

The state of the middle button of this mouse device.

System_CAPS_pubpropertyOverrideCursor

Gets or sets the cursor for the entire application.

System_CAPS_pubpropertyRightButton

Gets the state of the right button of this mouse device.

System_CAPS_pubpropertyTarget

Gets the IInputElement that the input from this mouse device is sent to. (Overrides InputDevice.Target.)

System_CAPS_pubpropertyXButton1

Gets the state of the first extended button on this mouse device.

System_CAPS_pubpropertyXButton2

Gets the state of the second extended button of this mouse device.

NameDescription
System_CAPS_pubmethodCapture(IInputElement)

Captures mouse events to the specified element.

System_CAPS_pubmethodCapture(IInputElement, CaptureMode)

Captures mouse input to the specified element using the specified CaptureMode.

System_CAPS_pubmethodCheckAccess()

Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetButtonState(MouseButton)

Gets the state of the specified mouse button.

System_CAPS_protmethodGetClientPosition()

Calculates the position of the mouse pointer, in client coordinates.

System_CAPS_protmethodGetClientPosition(PresentationSource)

Calculates the position of the mouse pointer, in client coordinates, in the specified PresentationSource.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetPosition(IInputElement)

Gets the position of the mouse relative to a specified element.

System_CAPS_protmethodGetScreenPosition()

Calculates the screen position of the mouse pointer.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodSetCursor(Cursor)

Sets the mouse pointer to the specified Cursor

System_CAPS_pubmethodSynchronize()

Forces the mouse to resynchronize.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodUpdateCursor()

Forces the mouse cursor to update.

System_CAPS_pubmethodVerifyAccess()

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.

.NET Framework
Available since 3.0

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

Return to top
Show:
© 2016 Microsoft