RadInputPrompt with InputScope

7 posts, 1 answers
  1. Robert
    Robert avatar
    4 posts
    Member since:
    Mar 2013

    Posted 11 Apr 2013 Link to this post

    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.

  2. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 12 Apr 2013 Link to this post

    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.
  3. DevCraft banner
  4. Robert
    Robert avatar
    4 posts
    Member since:
    Mar 2013

    Posted 12 Apr 2013 Link to this post

    Thanks for the quick response, you have great support and I really appreciate it.
  5. KI performance
    KI performance avatar
    13 posts
    Member since:
    Jun 2013

    Posted 01 Oct 2013 Link to this post

    Hi Todor, 

    I tried your approach in combination with a password box but it threw an XAMLParseException. Is this an expected behaviour? 

    Thanks! 
  6. Todor
    Admin
    Todor avatar
    778 posts

    Posted 02 Oct 2013 Link to this post

    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.
  7. Laurensius
    Laurensius avatar
    17 posts
    Member since:
    Jan 2014

    Posted 31 Jan 2014 Link to this post

    sorry for bringing this thread up again, i want to know using this inputscope, how can i also add RadTextBox.WatermarkProperty?
  8. Todor
    Admin
    Todor avatar
    778 posts

    Posted 03 Feb 2014 Link to this post

    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.
Back to Top
DevCraft banner