This is a migrated thread and some comments may be shown as answers.

RadInputPrompt with InputScope

6 Answers 97 Views
InputPrompt
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 2
Robert asked on 12 Apr 2013, 02:29 AM
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

Sort by
0
Accepted
Todor
Telerik team
answered on 12 Apr 2013, 05:02 AM
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:
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! 
0
Todor
Telerik team
answered on 02 Oct 2013, 08:00 AM
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
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
Todor
Telerik team
answered on 03 Feb 2014, 09:32 AM
Hi Laurensius,

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.
Tags
InputPrompt
Asked by
Robert
Top achievements
Rank 2
Answers by
Todor
Telerik team
Robert
Top achievements
Rank 2
KI performance
Top achievements
Rank 1
Laurensius
Top achievements
Rank 1
Share this question
or