다음을 통해 공유


InputLanguageManager.SetInputLanguage(DependencyObject, CultureInfo) 메서드

정의

지정된 종속성 개체에 대한 InputLanguage 연결된 속성의 값을 설정합니다.

public:
 static void SetInputLanguage(System::Windows::DependencyObject ^ target, System::Globalization::CultureInfo ^ inputLanguage);
public static void SetInputLanguage (System.Windows.DependencyObject target, System.Globalization.CultureInfo inputLanguage);
static member SetInputLanguage : System.Windows.DependencyObject * System.Globalization.CultureInfo -> unit
Public Shared Sub SetInputLanguage (target As DependencyObject, inputLanguage As CultureInfo)

매개 변수

target
DependencyObject

InputLanguage 연결된 속성을 설정할 종속성 개체입니다.

inputLanguage
CultureInfo

InputLanguage 연결된 속성에 대한 새 값을 나타내는 CultureInfo 개체입니다.

예외

targetnull일 때 발생합니다.

예제

다음 예제에 사용 하는 방법을 보여 줍니다.는 InputLanguageManager 의 입력된 언어를 설정 하는 TextBox 요소입니다.

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

적용 대상

추가 정보