0 out of 1 rated this helpful - Rate this topic

InputMethod Class

Provides facilities for managing and interacting with the Text Services Framework, which provides support for alternate text input methods such as speech and handwriting.

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

The InputMethod type exposes the following members.

  NameDescription
Public propertyCanShowConfigurationUIGets a value that indicates whether or not this input method can display configuration user interface (UI).
Public propertyCanShowRegisterWordUIGets a value that indicates whether this input method can display word registration user interface (UI). 
Public propertyStatic memberCurrentGets a reference to any currently active input method associated with the current context.
Public propertyDispatcherGets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)
Public propertyHandwritingStateGets or sets the current state of handwriting input for this input method.
Public propertyImeConversionModeGets or sets the current conversion mode for the input method editor associated with this input method.
Public propertyImeSentenceModeGets or sets the current sentence mode for the input method editor associated with this input method.
Public propertyImeStateGets or sets the current state of the input method editor associated with this input method.
Public propertyMicrophoneStateGets or sets the current state of microphone input for this input method.
Public propertySpeechModeGets or sets the speech mode for this input method.
Top
  NameDescription
Public attached propertyInputScopeGets or sets the input scope for a specified dependency object.
Public attached propertyIsInputMethodEnabledGets or sets a value that indicates whether this input method is enabled.
Public attached propertyIsInputMethodSuspendedGets or sets a value that indicates whether this input method is suspended.
Public attached propertyPreferredImeConversionModeGets or sets a preferred ImeConversionModeValues value for a specified dependency object.
Public attached propertyPreferredImeSentenceModeGets or sets a preferred ImeSentenceModeValues value for a specified dependency object.
Public attached propertyPreferredImeStateGets or sets a preferred input method state for a specified dependency object.
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 the default hash function. (Inherited from Object.)
Public methodStatic memberGetInputScopeReturns the value of the InputScope  attached property for a specified dependency object.
Public methodStatic memberGetIsInputMethodEnabledReturns the value of the IsInputMethodEnabled  attached property for a specified dependency object.
Public methodStatic memberGetIsInputMethodSuspendedReturns the value of the IsInputMethodSuspended  attached property for a specified dependency object.
Public methodStatic memberGetPreferredImeConversionModeReturns the value of the PreferredImeConversionMode  attached property for a specified dependency object.
Public methodStatic memberGetPreferredImeSentenceModeReturns the value of the PreferredImeSentenceMode  attached property for a specified dependency object.
Public methodStatic memberGetPreferredImeStateReturns the value of the PreferredImeState  attached property for a specified dependency 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 methodStatic memberSetInputScopeSets the value of the InputScope attached property on the specified dependency object.
Public methodStatic memberSetIsInputMethodEnabledSets the value of the IsInputMethodEnabled attached property on the specified dependency object.
Public methodStatic memberSetIsInputMethodSuspendedSets the value of the IsInputMethodSuspended attached property on the specified dependency object.
Public methodStatic memberSetPreferredImeConversionModeSets the value of the PreferredImeConversionMode attached property on the specified dependency object.
Public methodStatic memberSetPreferredImeSentenceModeSets the value of the PreferredImeSentenceMode attached property on the specified dependency object.
Public methodStatic memberSetPreferredImeStateSets the value of the PreferredImeState attached property on the specified dependency object.
Public methodShowConfigureUI()Displays configuration user interface (UI) associated with the currently active keyboard text service.
Public methodShowConfigureUI(UIElement)Displays configuration user interface (UI) associated with the currently active keyboard text service, using a specified UIElement as the parent element for the configuration UI.
Public methodShowRegisterWordUI()Displays word registration user interface (UI) associated with the currently active keyboard text service.
Public methodShowRegisterWordUI(String)Displays word registration user interface (UI) associated with the currently active keyboard text service. Accepts a specified string as the default value to register.
Public methodShowRegisterWordUI(UIElement, String)Displays word registration user interface (UI) associated with the currently active keyboard text service. Accepts a specified string as the default value to register, and a specified UIElement as the parent element for the configuration UI.
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 eventStateChangedOccurs when the input method state (represented by the ImeState property) changes.
Top
  NameDescription
Public fieldStatic memberInputScopePropertyIdentifies the InputScope attached property.
Public fieldStatic memberIsInputMethodEnabledPropertyIdentifies the IsInputMethodEnabled attached property.
Public fieldStatic memberIsInputMethodSuspendedPropertyIdentifies the IsInputMethodSuspended attached property.
Public fieldStatic memberPreferredImeConversionModePropertyIdentifies the PreferredImeConversionMode attached property.
Public fieldStatic memberPreferredImeSentenceModePropertyIdentifies the PreferredImeSentenceMode attached property.
Public fieldStatic memberPreferredImeStatePropertyIdentifies the PreferredImeState attached property.
Top

The following example demonstrates how to use an InputMethod object.

InputMethod.SetPreferredImeState(myTextBox, InputMethodState.On);
InputMethod.Current.ImeSentenceMode = ImeSentenceModeValues.Automatic;
InputMethod.Current.HandwritingState = InputMethodState.On;
InputMethod.Current.SpeechMode = SpeechMode.Dictation;
InputScope myInputScope = new InputScope();
myInputScope.RegularExpression = "W|P|F";
InputMethod.SetInputScope(myTextBox, myInputScope);
tb6.Text = "Configuration UI Available?: " + InputMethod.Current.CanShowConfigurationUI.ToString();

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