Wpf: How to use PasswordBox with DataBinding

Wpf: How to use PasswordBox with DataBinding

Old forum URL: forums.lhotka.net/forums/t/6893.aspx


Luzius posted on Sunday, May 03, 2009

Hi all,

I have a UserEditDialog which should also contain a PasswordBox to enter the user's password. Of course I'd like to use DataBinding to bind all controls to my UserEdit BO.

Unfortunalely, for security concerns, it's impossible to bind the Password property of the PasswordBox.

Does anyone have a solution to this problem?

Does anyone know how to tweak TextBox to display just * instead of the real text? (I know, this is a security risk, but I'm willing to take it.)

Thanks Luzius 

Fintanv replied on Tuesday, May 05, 2009

I think you can use the solution on the following page:

http://blog.functionalfun.net/2008/06/wpf-passwordbox-and-data-binding.html

Luzius replied on Tuesday, May 05, 2009

Great, that actually worked.

Thanks Luzius

Copyright (c) Marimer LLC