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:

image

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:

image

Figure 32.13 shows the result of the code.

Figure 32.13 Implementing a PasswordBox.

image

The main event in the PasswordBox is PasswordChanged that is raised when the control’s content changes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.143.65