PasswordBox
The PasswordBox
control is a special text box intended for entering passwords and that automatically hides characters. The following code snippet shows an example:
By default characters are hidden with a dot, but you can replace it via the PasswordChar
property (optional). The MaxLength
property limits the password length (optional). Such control exposes the Password
property of type String
that is the entered password, as demonstrated by the following code:
Figure 32.13 shows the result of the code.
The main event in the PasswordBox
is PasswordChanged
that is raised when the control’s content changes.
18.216.143.65