1

I have an application where user is adviced to write numbers only in a textBox. However, on textBox GotFocus-attribute I end up with a regular keyboard. How can I change this to phone dialer input, or a number-only input?

        <TextBox 
        Grid.ColumnSpan="2" 
        Grid.Row="3"
        Grid.Column="0"
        FontSize="80"
        FontWeight="Bold"
        Height="130" 
        HorizontalAlignment="Center"
        Width="200"
        Margin="0,0,0,0" 
        Name="userAnswer" 
        Text="" 
        TextAlignment="Center"
        VerticalAlignment="Stretch"
        GotFocus="userAnswer_GotFocus"
        Background="White"
        Foreground="Black"            
        />
Bob
  • 22,810
  • 38
  • 143
  • 225
Benny Skogberg
  • 10,431
  • 11
  • 53
  • 83

1 Answers1

4

You need to use the InputScope attribute:

InputScope="TelephoneNumber"
Olivier Payen
  • 15,198
  • 7
  • 41
  • 70