Прочетете на английски Редактиране

Споделяне чрез


InputLanguageManager.AvailableInputLanguages Property

Definition

Gets an enumerator for currently available input languages.

C#
public System.Collections.IEnumerable AvailableInputLanguages { get; }

Property Value

An enumerator for currently available input languages, or null if no input languages are available. This property has no default value.

Examples

The following example demonstrates how to use an InputLanguageManager to enumerate the available input languages.

C#
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();

Applies to

Продукт Версии
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10