Partager via


InputLanguageManager.Current Propriété

Définition

Obtient le gestionnaire de langues d'entrée associé au contexte actuel.

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

Valeur de propriété

Objet InputLanguageManager associé au contexte actuel.

Cette propriété n’a aucune valeur par défaut.

Exemples

L’exemple suivant montre comment utiliser un InputLanguageManager pour accéder au gestionnaire de langage associé au contexte actuel.

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

S’applique à