Bagikan melalui


InputLanguageManager.AvailableInputLanguages Properti

Definisi

Mendapatkan enumerator untuk bahasa input yang tersedia saat ini.

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

Nilai Properti

Enumerator untuk bahasa input yang tersedia saat ini, atau null jika tidak ada bahasa input yang tersedia. Properti ini tidak memiliki nilai default.

Contoh

Contoh berikut menunjukkan cara menggunakan InputLanguageManager untuk menghitung bahasa input yang tersedia.

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()

Berlaku untuk