This question is locked. New answers and comments are not allowed.
Hi, is it possible to set an InputScope for a the RadInputPrompt? I would like to be able to default it to Number. The prompt requests the user enter a pin number and display an alpha keyboard.
6 Answers, 1 is accepted
0
Accepted
Hi Robert,
The InputScope property is part of the TextBox control, so you can use it in the text mode of RadInputPrompt with the following approach:
If you want to display the prompt in password mode, you will not be able to add an input scope.
Let me know if I can assist you further.
Regards,
Todor
the Telerik team
The InputScope property is part of the TextBox control, so you can use it in the text mode of RadInputPrompt with the following approach:
Style textBoxStyle =
new
Style(
typeof
(RadTextBox));
textBoxStyle.Setters.Add(
new
Setter(RadTextBox.InputScopeProperty,
"Number"
));
string
messageTitle =
"Enter your PIN"
;
string
message =
"Please enter your PIN number:"
;
RadInputPrompt.Show(messageTitle, MessageBoxButtons.OKCancel, message, InputMode.Text, textBoxStyle);
If you want to display the prompt in password mode, you will not be able to add an input scope.
Let me know if I can assist you further.
Regards,
Todor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Robert
Top achievements
Rank 2
answered on 12 Apr 2013, 12:06 PM
Thanks for the quick response, you have great support and I really appreciate it.
0
KI performance
Top achievements
Rank 1
answered on 01 Oct 2013, 12:58 PM
Hi Todor,
I tried your approach in combination with a password box but it threw an XAMLParseException. Is this an expected behaviour?
Thanks!
I tried your approach in combination with a password box but it threw an XAMLParseException. Is this an expected behaviour?
Thanks!
0
Hello Sascha,
Yes, this is expected.
When you use RadInputPrompt for password input, you are using it with RadPasswordBox and not with RadTextBox. This is why if you try to apply a style that targets RadTextBox (as in the previous post) to RadPasswordBox, you get the exception. When you want to style the password box, you need to provide a style that target RadPasswordBox.
However, you won't find InputScope property in neither RadPasswordBox, nor in the native PasswordBox, so you can't have a password field and have the numeric keyboard on, because Windows Phone doesn't allow us to.
Regards,
Todor
Telerik
Yes, this is expected.
When you use RadInputPrompt for password input, you are using it with RadPasswordBox and not with RadTextBox. This is why if you try to apply a style that targets RadTextBox (as in the previous post) to RadPasswordBox, you get the exception. When you want to style the password box, you need to provide a style that target RadPasswordBox.
However, you won't find InputScope property in neither RadPasswordBox, nor in the native PasswordBox, so you can't have a password field and have the numeric keyboard on, because Windows Phone doesn't allow us to.
Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Laurensius
Top achievements
Rank 1
answered on 01 Feb 2014, 12:42 AM
sorry for bringing this thread up again, i want to know using this inputscope, how can i also add RadTextBox.WatermarkProperty?
0
Hi Laurensius,
You can simply add another setter to the Setters collection of the text box style:
Let me know if you need further assistance.
Regards,
Todor
Telerik
You can simply add another setter to the Setters collection of the text box style:
textBoxStyle.Setters.Add(
new
Setter(RadTextBox.WatermarkProperty,
"Enter text"
));
Let me know if you need further assistance.
Regards,
Todor
Telerik
If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.