다음을 통해 공유


InputLanguageManager.GetInputLanguage(DependencyObject) 메서드

정의

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

public:
 static System::Globalization::CultureInfo ^ GetInputLanguage(System::Windows::DependencyObject ^ target);
[System.ComponentModel.TypeConverter(typeof(System.Windows.CultureInfoIetfLanguageTagConverter))]
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static System.Globalization.CultureInfo GetInputLanguage (System.Windows.DependencyObject target);
[<System.ComponentModel.TypeConverter(typeof(System.Windows.CultureInfoIetfLanguageTagConverter))>]
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetInputLanguage : System.Windows.DependencyObject -> System.Globalization.CultureInfo
Public Shared Function GetInputLanguage (target As DependencyObject) As CultureInfo

매개 변수

target
DependencyObject

입력 언어를 검색할 종속성 개체입니다.

반환

지정된 종속성 개체에 대한 입력 언어를 나타내는 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()

적용 대상

추가 정보