InputLanguageManager.AvailableInputLanguages 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得目前可用輸入語言的列舉值。
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()