1
votes

currently I am working on a WPF project for a Windows 8 tablet. When a user sets focus on an input field, the touch keyboard should appear.

private void txtVisFamName_GotFocus(object sender, RoutedEventArgs e)
    {
        Process.Start("tabtip.exe");
    }

The tabtip keyboard appears but I was wondering if i could make it appear more customized. The uses has no need for certain buttons like ALT or CTRL.

I already tried adding an input scope to the textfield but it has no effect on the keyboard appearing.

<TextBox Text="{Binding VisitorFirstName}" id.Row="1" Grid.Column="2" TabIndex="1" Style="{StaticResource txtStyle}" Name="txtVisFamName" HorizontalAlignment="Left" Width="500" InputScope="PersonalFullName" GotFocus="txtVisFamName_GotFocus">

Any advise on how I can change the appearence of the keyboard would be appreciated. Thanks in advance.

1

1 Answers

0
votes

As far as I know there is very little customization you can do with the built-in keyboard. This customization is done via the InputScope property you were setting. The following are the different settings I have used to show the different virtual keyboard configurations:

  • InputScope="Default"
  • InputScope="Url"
  • InputScope="EmailSmtpAddress"
  • InputScope="Number"

You can see samples of these different virtual keyboards at http://mheironimus.blogspot.com/2015/05/adding-touch-keyboard-support-to-wpf.html.

You can, however, create your own virtual keyboard that just has the keys on it you want. There are various examples of how to do this out on the internet (http://www.codeproject.com/Articles/32568/A-Touch-Screen-Keyboard-Control-in-WPF, http://jhvirtualkeyboard.codeplex.com/, etc.).