locked
password box and visible password RRS feed

  • Question

  •  

    is it possible to show password entered by user in PasswordBox?
    Saturday, October 13, 2007 6:10 PM

Answers

  • No, any such features would provide an easy attack surface for hackers.

     

    You also cannot set a binding on the Password property for the same reason.  It can be the source of a binding (since any CLR property can), but it is not a DP and the class does not provide change notifications, so the binding would not dynamically update as the password is changed.

     

    If you don't care that much about security...  (I suppose then one might ask why you're using a PasswordBox) ... you could easily create a user control that toggles between a template using a PasswordBox and a template using a TextBox.  You'd just need to update the Text and Password properties in code when switching templates.

     

    Sunday, October 14, 2007 2:02 AM
  • nope.. you could use a textbox instead

     

    Sunday, October 14, 2007 4:08 AM

All replies

  • No, any such features would provide an easy attack surface for hackers.

     

    You also cannot set a binding on the Password property for the same reason.  It can be the source of a binding (since any CLR property can), but it is not a DP and the class does not provide change notifications, so the binding would not dynamically update as the password is changed.

     

    If you don't care that much about security...  (I suppose then one might ask why you're using a PasswordBox) ... you could easily create a user control that toggles between a template using a PasswordBox and a template using a TextBox.  You'd just need to update the Text and Password properties in code when switching templates.

     

    Sunday, October 14, 2007 2:02 AM
  • nope.. you could use a textbox instead

     

    Sunday, October 14, 2007 4:08 AM