This avoid the user for entering Letters in a field which requires to be entered only numbers.
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.
No comments:
Post a Comment