IsReadOnly for PasswordBox

3 posts, 1 answers
  1. David
    David avatar
    9 posts
    Member since:
    Sep 2012

    Posted 21 Oct 2012 Link to this post

    Hi.
    Is there way to set PasswordBox as read only. In my app there is a login screen which may be passed automatically (if according check box is checked) and in this case I need to set user name input field (TextBox) and password input field (PasswordBox) as read only. I'm able to do that with user name input field but not with login input field. So how to bring both controls to the same look&feel and read only state? Please note that I don't need to use IsEnabled = false !

    Thank You.
  2. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 22 Oct 2012 Link to this post

    Hello David,

    Thank you for your question.

    Our RadTextBox and RadPasswordBox components are intended to bring additional functionality to the native TextBox and PasswordBox - like validation, buttons, etc. The IsReadOnly property comes from the native TextBox and is not present in the native PasswordBox. I assume that the idea behind it is that when the TextBox is read only it will simply display a text that shouldn't be changed but should only be read and in the PasswordBox, simply displaying the dots wouldn't be such useful as in the TextBox.

    What the password box does is, mask the input. If I understand your scenario right and since you don't want to use the IsEnabled properties in these controls, when you need the automatic login, you don't really have an input and therefore you can go without the password box. You can simply use the text box and fill it as many Bullet characters ((char)9679) as the length of the password is.

    I hope this information help. Let me know if this works for you and if you need additional assistance.

    Kind regards, Todor
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. David
    David avatar
    9 posts
    Member since:
    Sep 2012

    Posted 22 Oct 2012 Link to this post

    Hello Todor.

    Thanks for answer. It seems this the the best work around I can use. But in any case having one more extra property for PasswordBox would be very good in a near future.

    Thank You.
Back to Top