How to set mode Password for TextBox control?

I want to set TextBox to password mode (with * for each character). I can not find out how to implement this feature. Please help me...

Thanks.



Answer this question

How to set mode Password for TextBox control?

  • Ross71

    Is there any way to monitor the caret index of a passwordbox like you can in a textbox

  • otiko

    the passwordbox doesnt support it....

    You are really looking for a masked textbox which isnt supported in the current version. .. an alternative is to use the Winforms MaskedTextBox.


  • JayaC

    Thanks guy,

    It works fine... excellent!


  • techie1111

    The TextBox doesn't have a password mode. Instead, there's a special control for this: PasswordBox.

    I think the main reason for this is that TextBox supports a bunch of features that you almost certainly don't want in a password box, like multiline text, typography, text decorations.


  • MattK_r

    Use PasswordBox control and set PasswordChar as '*'
  • How to set mode Password for TextBox control?