Reputation: 5848
like when the user tap the text box, instead of popping up a full keyboard it will only pop up a number pad, is it possible?
or if it is not possible, can we just disable the app from popping up the keyboard when we tap the box?
Upvotes: 0
Views: 2792
Reputation: 1384
You haven't indicated whether you're using C#/VB and XAML, or HTML and JavaScript. For the latter, this is very simple. When you add an input field, simply use the value "number" for the "type" attribute:
<input id="myNumericInput" type="number" />
and the soft input panel will automatically switch to numeric input when the user taps on the field.
The equivalent for XAML is to use InputScope, which is also set to "Number" (uppercase N):
<TextBox x:Name="myNumericTextbox" InputScope="Number" Width="500" Height="50"></TextBox>
This should likewise cause the numeric input panel to appear when the user taps the input field.
Upvotes: 1