Reputation: 427
I've problem with OSK in WPF. I change the InputLanauage by InputLanguageManager like this:
InputLanguageManager.SetInputLanguage(_targetKeyboardWindow, CultureInfo.CreateSpecificCulture("ru"));
But it doesn't work. I need to change the actual view of my application (by click back button) and then my changes in InputLanguageManager starts to work. But when I tried to change View from code-behind after I change input language - it does not work.
Moreover, in debugger I can see that after changing language, the current language is still default (previous)
Any idea?
Upvotes: 3
Views: 2099
Reputation: 427
Ok, the solution is trivial .
Instead of:
InputLanguageManager.SetInputLanguage(_targetKeyboardWindow, CultureInfo.CreateSpecificCulture("ru"));
use:
InputLanguageManager.Current.CurrentInputLanguage = new CultureInfo("ru");
Best regards.
Upvotes: 6