How can i set the keyboard to open in number mode or directly open a special numeric keyboard (as in android)??? My goal is to avoid the user to press the little button to toggle letters and numbers everytime before entering the value that may only be a numerical value. I have a textbox that the user needs to edit.Thanks!!!!
Set the InputScope
to Number
.
XAML
<TextBox InputScope="Number" Name="txtPhoneNumber" />
C#
InputScope scope = new InputScope();
InputScopeName name = new InputScopeName();
name.NameValue = InputScopeNameValue.Number;
scope.Names.Add(name);
txtPhoneNumber.InputScope = scope;
Above code snippets taken from this MSDN article which you can review for more information. As Martin added in the comment, you can also see screenshots of the different InputScope options here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With