Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

InputManager Class

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

Namespace:  System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)
public sealed class InputManager : DispatcherObject

The InputManager type exposes the following members.

  NameDescription
Public propertyStatic memberCurrentGets the InputManager associated with the current thread.
Public propertyDispatcherGets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)
Public propertyInputProvidersGets a collection of InputProviders registered with the InputManager.
Public propertyIsInMenuModeGets a value that indicates whether this ComponentDispatcher is in menu mode.
Public propertyMostRecentInputDeviceGets a value that represents the input device associated with the most recent input event.
Public propertyPrimaryKeyboardDeviceGets the primary keyboard device.
Public propertyPrimaryMouseDeviceGets the primary mouse device.
Top
  NameDescription
Public methodCheckAccessDetermines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodPopMenuModeCalled by components to leave menu mode.
Public methodProcessInputProcesses the specified input synchronously.
Public methodPushMenuModeCalled by components to enter menu mode.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodVerifyAccessEnforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)
Top
  NameDescription
Public eventEnterMenuModeOccurs when a control enters menu mode by calling the PushMenuMode method.
Public eventHitTestInvalidatedAsyncOccurs when the result of a hit-test may have changed.
Public eventLeaveMenuModeOccurs when a control leaves menu mode by calling the PopMenuMode method.
Public eventPostNotifyInputOccurs after the PreNotifyInput handlers have finished processing the input and the corresponding Windows Presentation Foundation (WPF) events have been raised. 
Public eventPostProcessInputOccurs after the PreNotifyInput handlers have finished processing the input.
Public eventPreNotifyInputOccurs when the PreProcessInput handlers have finished processing the input, if the input was not canceled.
Public eventPreProcessInputOccurs when the InputManager starts to process the input item.
Top

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.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.