InputLanguageManager Class

 

Provides facilities for managing input languages in Windows Presentation Foundation (WPF).

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

System.Object
  System.Windows.Threading.DispatcherObject
    System.Windows.Input.InputLanguageManager

public sealed class InputLanguageManager : DispatcherObject

NameDescription
System_CAPS_pubpropertyAvailableInputLanguages

Gets an enumerator for currently available input languages.

System_CAPS_pubpropertySystem_CAPS_staticCurrent

Gets the input language manager associated with the current context.

System_CAPS_pubpropertyCurrentInputLanguage

Gets or sets the current input language.

System_CAPS_pubpropertyDispatcher

Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticInputLanguage

Gets or sets the preferred input language for the associated dependency object.

System_CAPS_pubpropertySystem_CAPS_staticRestoreInputLanguage

Gets or sets a value that indicates whether or not the previously active input language should be restored when the associated dependency object looses the input focus.

NameDescription
System_CAPS_pubmethodCheckAccess()

Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetInputLanguage(DependencyObject)

Returns the value of the InputLanguage  attached property for a specified dependency object.

System_CAPS_pubmethodSystem_CAPS_staticGetRestoreInputLanguage(DependencyObject)

Returns the value of RestoreInputLanguage  attached property for a specified dependency object.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodRegisterInputLanguageSource(IInputLanguageSource)

Registers an input language source with the InputLanguageManager.

System_CAPS_pubmethodReportInputLanguageChanged(CultureInfo, CultureInfo)

Report the completion of a change of input language to the InputLanguageManager.

System_CAPS_pubmethodReportInputLanguageChanging(CultureInfo, CultureInfo)

Report the initiation of a change of input language to the InputLanguageManager.

System_CAPS_pubmethodSystem_CAPS_staticSetInputLanguage(DependencyObject, CultureInfo)

Sets the value of the InputLanguage attached property on the specified dependency object.

System_CAPS_pubmethodSystem_CAPS_staticSetRestoreInputLanguage(DependencyObject, Boolean)

Sets the value of the RestoreInputLanguage dependency property on the specified dependency object.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodVerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticInputLanguageProperty

Identifies the InputLanguage  attached property.

System_CAPS_pubfieldSystem_CAPS_staticRestoreInputLanguageProperty

Identifies the RestoreInputLanguage  attached property.

NameDescription
System_CAPS_pubeventInputLanguageChanged

Occurs when a change of input language is completed.

System_CAPS_pubeventInputLanguageChanging

Occurs when a change of input language is initiated.

Additional languages can be registered by using the Regional and Language Options control panel. From the Languages tab, select "Text Services and input languages", then click the "Details" button to register additional languages. The following dialog appears.

Text services and input languages dialog.

The following example demonstrates how to use an InputLanguageManager to set the input language of a TextBox element.

this.Dispatcher.Thread.CurrentCulture.Name.ToString();
InputLanguageManager.SetInputLanguage(myTextBox, CultureInfo.CreateSpecificCulture("fr"));
tb2.Text = "Available Input Languages:";
lb1.ItemsSource = InputLanguageManager.Current.AvailableInputLanguages;
tb3.Text = "Input Language of myTextBox is " + InputLanguageManager.GetInputLanguage(myTextBox).ToString();
tb4.Text = "CurrentCulture is Set to " + this.Dispatcher.Thread.CurrentCulture.Name.ToString();

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: