1

I would like to invoke On-Screen Keyboard on button click in WPF. Is this possible and can I do this in C#/XAML?

I just want to have one button, that opens and another one to close the keyboard.

Kissaki
  • 8,810
  • 5
  • 40
  • 42
mskuratowski
  • 4,014
  • 15
  • 58
  • 109
  • 1
    Possible duplicate of [How to make WPF input control show virtual Keyboard when it got focus in touch screen](https://stackoverflow.com/questions/19085931/how-to-make-wpf-input-control-show-virtual-keyboard-when-it-got-focus-in-touch-s) – Travis Tubbs Aug 04 '17 at 13:10

1 Answers1

2

This will help you start the default On-Screen keyboard,hence there wont be any effort to create one.

Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.System) + Path.DirectorySeparatorChar + "osk.exe");

or just give : Process.Start("C:\\Windows\\System32\\osk.exe");

or Process.Start("osk.exe");

Not : if platform is 64 bit debug in x64

osk = on screen keyboard !

Tharif
  • 13,794
  • 9
  • 55
  • 77
  • What should I pass in Path.DirectorySeparatorChar ? Now I have an error "Syste.Windows.Shapes.Pth" does not contain a definition for 'DirectorySeparatorChar' – mskuratowski May 30 '15 at 09:33