1
Reply

how to get current input language in wpf c#?

Sumit Kumawat

Sumit Kumawat

Nov 25 2017 2:32 PM
243
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)