InputManager Class

Definition

Manages all the input systems in Windows Presentation Foundation (WPF).

public ref class InputManager sealed : System::Windows::Threading::DispatcherObject
public sealed class InputManager : System.Windows.Threading.DispatcherObject
type InputManager = class
    inherit DispatcherObject
Public NotInheritable Class InputManager
Inherits DispatcherObject
Inheritance
InputManager

Remarks

The InputManager class is responsible for coordinating all of the input systems in WPF.

A filter is any code that listens to PreProcessInput or PostProcessInput. Filters can modify the input staging area.

A monitor is any code that listens to PreNotifyInput or PostNotifyInput. Monitors cannot modify the input staging area.

The InputManager controls the input staging area. The input staging area processes input into Windows Presentation Foundation (WPF) events.

Input is processed in WPF in the follow stages:

  1. Pre-process stage. The input manager raises the PreProcessInput event.

  2. Pre-notify stage. The input manager raises the PreNotifyInput event.

  3. The WPF input event or events are raised.

  4. Post-notify stage. The input manager raises the PostNotifyInput event.

  5. Post-process stage. The input manager raises the PostProcessInput event.

Properties

Current

Gets the InputManager associated with the current thread.

Dispatcher

Gets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
InputProviders

Gets a collection of InputProviders registered with the InputManager.

IsInMenuMode

Gets a value that indicates whether this ComponentDispatcher is in menu mode.

MostRecentInputDevice

Gets a value that represents the input device associated with the most recent input event.

PrimaryKeyboardDevice

Gets the primary keyboard device.

PrimaryMouseDevice

Gets the primary mouse device.

Methods

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

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PopMenuMode(PresentationSource)

Called by components to leave menu mode.

ProcessInput(InputEventArgs)

Processes the specified input synchronously.

PushMenuMode(PresentationSource)

Called by components to enter menu mode.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)

Events

EnterMenuMode

Occurs when a control enters menu mode by calling the PushMenuMode(PresentationSource) method.

HitTestInvalidatedAsync

Occurs when the result of a hit-test may have changed.

LeaveMenuMode

Occurs when a control leaves menu mode by calling the PopMenuMode(PresentationSource) method.

PostNotifyInput

Occurs after the PreNotifyInput handlers have finished processing the input and the corresponding Windows Presentation Foundation (WPF) events have been raised.

PostProcessInput

Occurs after the PreNotifyInput handlers have finished processing the input.

PreNotifyInput

Occurs when the PreProcessInput handlers have finished processing the input, if the input was not canceled.

PreProcessInput

Occurs when the InputManager starts to process the input item.

Applies to

See also