Feb 20, 2011 at 9:37 AM

What would be the best way to mask the characters of a string property like a password?

I'm displaying the properties of an sql connection and one of them is the password.

Feb 22, 2011 at 4:14 PM

See the latest source code. You can decorate with password property with the [Password] attribute - and PropertyEditor will use a PasswordBox to edit the password (with a little trick since PasswordBox does not let you bind to the Password property).

If you are using a SecureString some more changes may be neccessary.

Feb 22, 2011 at 7:00 PM


I wasn't expecting you to write something for me. I'm not using a SecureString.