Search code examples
c#uwpwindows-phone-8uwp-xaml

How to reveal/hide characters in PasswordBox?


I need to create a checkbox that will reveal password characters in two PasswordBox controls (Password and Confirm Password respectively). So, when this checkbox is checked PasswordBox must show password instead of "*****". Actually, I'm asking about property (if it exists) that controls this behavior of PasswordBox. I didn't find it on MSDN (or didn't understand).


Solution

  • You have to use TextBox to show characters. You can put them over your PasswordBoxes and bind Text to Password and Visibility to IsChecked of CheckBox