Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Windows 10 touch keyboard docked in WPF

We started creating a WPF touch application in Windows 8 and recently migrated to Windows 10. One feature we implemented is opening the Windows Keyboard when a TextBox receives focus. In Windows 8, it was possible to dock the keyboard to the bottom by setting the registry setting EdgeTargetDockedState and starting the TabTip process:

     string path =  @"C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe";
     var info = new ProcessStartInfo(path);
     info.WindowStyle = ProcessWindowStyle.Maximized;
     var p = new Process();
     p.StartInfo = info;
     p.Start();

The Windows 10 keyboard however doesn't seem to have the same dock behavior as in Windows 8. The keyboard now overlays any maximized window which hides the bottom part of any application. Only not-maximized windows are resized to fit the remaining space.

I've checked the following links, but found no solution:

  • https://superuser.com/questions/951841/windows-10-touch-keyboard-doesnt-dock-or-maximize-at-the-bottom-of-the-screen
  • http://answers.microsoft.com/en-us/windows/forum/windows_10-desktop/windows-10-touch-keyboard-doesnt-dock/3c253400-568f-4e89-a253-0d7a747b5b63

Can the Windows 10 keyboard be docked programmatically for a maximized window?

like image 446
Bruno V Avatar asked Jan 13 '16 14:01

Bruno V


People also ask

How do I dock my virtual keyboard?

The dock option works similar to a window which maximizes and you cannot move the particular window around. When you click on dock option, it switch the on-screen keyboard from fixed to the bottom of the screen with full screen mode.


1 Answers

I open-sourced my project to automate everything concerning TabTip integration in WPF app.

You can get it on nuget, and after that all you need is a simple config in your apps startup logic:

TabTipAutomation.BindTo<TextBox>();

You can bind TabTip automation logic to any UIElement. Virtual Keyboard will open when any such element will get focus, and it will close when element will lose focus. Not only that, but TabTipAutomation will move UIElement (or Window) into view, so that TabTip will not block focused element.

For more info refer to the project site.

To clarify: If you will be using this package TabTip will not be docked, but your UI will be in view, which i guess is what you wanted to achieve.

like image 120
Max Avatar answered Oct 24 '22 23:10

Max