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

IsReadOnly for PasswordBox

2 Answers 233 Views
PasswordBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 21 Oct 2012, 07:21 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Todor
Telerik team
answered on 22 Oct 2012, 07:52 AM
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.

0
David
Top achievements
Rank 1
answered on 22 Oct 2012, 09:31 AM
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.
Tags
PasswordBox
Asked by
David
Top achievements
Rank 1
Answers by
Todor
Telerik team
David
Top achievements
Rank 1
Share this question
or