Click here to Skip to main content
16,003,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

XML
<PasswordBox Canvas.Left="305" Canvas.Top="333" Height="23" name="txtAdminPass" Width="78"/>
<PasswordBox Canvas.Left="515" Canvas.Top="331" Height="23" Name="txtAdminConfirmPass" Width="84"/>


this are my two password boxes..the password character is *.
now i placed one checkbox next to them.

now i want like when i check the checkbox it should show the orginal password and on uncheck it should show ****

Please tell me how to do that..
Posted
Comments
Sergey Alexandrovich Kryukov 20-May-13 1:31am    
This is a correct answer, but I already answered, please see.
—SA

1 solution

The class System.Windows.Controls.PasswordBox does not allow showing password characters at all:

Please see: http://msdn.microsoft.com/en-us/library/system.windows.controls.passwordbox.aspx[^].

This is considered as unsafe.

You can achieve such effect only if you create your own password input class derived from System.Windows.Controls.TextBox.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900