0

I'm working on an WPF application, that has to run on a Windows Surface Pro. And now i'm running into problems with the on screen keyboard.

I tried this solution: http://code.msdn.microsoft.com/windowsdesktop/Enabling-Windows-8-Touch-7fb4e6de

But this breaks the listview.

Now i have this:

private Process m_KeyBoard = new Process();

private void TextBox_GotFocus_1(object sender, RoutedEventArgs e)
{
    m_KeyBoard.StartInfo = new ProcessStartInfo(@"C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe");
    m_KeyBoard.Start();
}

And this works, but i don't like it. Is there a better sollution?

And if there isn't a better solution, how can I stop the process if the textbox loses his focus?

Sheridan
  • 68,826
  • 24
  • 143
  • 183
user2499088
  • 625
  • 1
  • 6
  • 12

1 Answers1

0

I don't have a better solution for you, but to stop the process (refer to this question), call the following on the textbox's LostFocus event:

m_KeyBoard.Kill()
Community
  • 1
  • 1
Gigi
  • 28,163
  • 29
  • 106
  • 188