Condividi tramite


InputLanguageManager.Current Proprietà

Definizione

Ottiene il gestore delle lingue di input associato al contesto corrente.

public:
 static property System::Windows::Input::InputLanguageManager ^ Current { System::Windows::Input::InputLanguageManager ^ get(); };
public static System.Windows.Input.InputLanguageManager Current { get; }
static member Current : System.Windows.Input.InputLanguageManager
Public Shared ReadOnly Property Current As InputLanguageManager

Valore della proprietà

Un oggetto InputLanguageManager associato al contesto corrente.

Nessun valore predefinito per questa proprietà.

Esempio

Nell'esempio seguente viene illustrato come usare un InputLanguageManager oggetto per accedere al gestore del linguaggio associato al contesto corrente.

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

Si applica a