共用方式為


InputLanguageManager.AvailableInputLanguages 屬性

定義

取得目前可用輸入語言的列舉值。

public:
 property System::Collections::IEnumerable ^ AvailableInputLanguages { System::Collections::IEnumerable ^ get(); };
public System.Collections.IEnumerable AvailableInputLanguages { get; }
member this.AvailableInputLanguages : System.Collections.IEnumerable
Public ReadOnly Property AvailableInputLanguages As IEnumerable

屬性值

目前可用輸入語言的列舉值,如果沒有輸入語言,則 null 為 。 此屬性沒有預設值。

範例

下列範例示範如何使用 InputLanguageManager 來列舉可用的輸入語言。

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();
Me.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 " & Me.Dispatcher.Thread.CurrentCulture.Name.ToString()

適用於