InputManager InputManager InputManager 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

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 Current Current Current

Gets the InputManager associated with the current thread.

Dispatcher Dispatcher Dispatcher Dispatcher

Gets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
InputProviders InputProviders InputProviders InputProviders

Gets a collection of InputProviders registered with the InputManager.

IsInMenuMode IsInMenuMode IsInMenuMode IsInMenuMode

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

MostRecentInputDevice MostRecentInputDevice MostRecentInputDevice MostRecentInputDevice

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

PrimaryKeyboardDevice PrimaryKeyboardDevice PrimaryKeyboardDevice PrimaryKeyboardDevice

Gets the primary keyboard device.

PrimaryMouseDevice PrimaryMouseDevice PrimaryMouseDevice PrimaryMouseDevice

Gets the primary mouse device.

Methods

CheckAccess() CheckAccess() CheckAccess() CheckAccess()

Determines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PopMenuMode(PresentationSource) PopMenuMode(PresentationSource) PopMenuMode(PresentationSource) PopMenuMode(PresentationSource)

Called by components to leave menu mode.

ProcessInput(InputEventArgs) ProcessInput(InputEventArgs) ProcessInput(InputEventArgs) ProcessInput(InputEventArgs)

Processes the specified input synchronously.

PushMenuMode(PresentationSource) PushMenuMode(PresentationSource) PushMenuMode(PresentationSource) PushMenuMode(PresentationSource)

Called by components to enter menu mode.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess() VerifyAccess() VerifyAccess() VerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)

Events

EnterMenuMode EnterMenuMode EnterMenuMode EnterMenuMode

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

HitTestInvalidatedAsync HitTestInvalidatedAsync HitTestInvalidatedAsync HitTestInvalidatedAsync

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

LeaveMenuMode LeaveMenuMode LeaveMenuMode LeaveMenuMode

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

PostNotifyInput PostNotifyInput PostNotifyInput PostNotifyInput

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

PostProcessInput PostProcessInput PostProcessInput PostProcessInput

Occurs after the PreNotifyInput handlers have finished processing the input.

PreNotifyInput PreNotifyInput PreNotifyInput PreNotifyInput

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

PreProcessInput PreProcessInput PreProcessInput PreProcessInput

Occurs when the InputManager starts to process the input item.

Applies to

See also