Sumit Kumawat

Sumit Kumawat

  • NA
  • 454
  • 414.5k

how to get current input language in wpf c#?

Nov 25 2017 2:32 PM
Hi all,
 
i am creating a wpf application and getting current input language using below code
 
string lang = "Current " + InputLanguageManager.Current.CurrentInputLanguage.ToString();
 
and it is working fine but now when i am setting this inside the background worker thread i am getting
 
exception "Object reference not set to an instance of an object."
 
please tell me how to use dispatcher for getting current input language.
 
TIA

Answers (1)