ערוך

שתף באמצעות


MouseDevice Class

Definition

Represents a mouse device.

public ref class MouseDevice abstract : System::Windows::Input::InputDevice
public abstract class MouseDevice : System.Windows.Input.InputDevice
type MouseDevice = class
    inherit InputDevice
Public MustInherit Class MouseDevice
Inherits InputDevice
Inheritance

Remarks

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.

Properties

ActiveSource

Gets the PresentationSource that is reporting input for this device.

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.

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.

Methods

Capture(IInputElement, CaptureMode)

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

Capture(IInputElement)

Captures mouse events to the specified element.

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)
GetButtonState(MouseButton)

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 the default hash function.

(Inherited from Object)
GetPosition(IInputElement)

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(Cursor)

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)

Applies to

See also