Export (0) Print
Expand All

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.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (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, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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.

Community Additions

ADD
Show:
© 2014 Microsoft