

You can do this in the handler for the PasswordChanged event to perform validation while the user enters the password.
#PASSWORDBOX AVG PASSWORD#
Use the Password property to get or set the contents of the PasswordBox.
#PASSWORDBOX AVG CODE#
Get the app from the Microsoft Store or get the source code on GitHub The WinUI 3 Gallery app includes interactive examples of most WinUI 3 controls, features, and functionality. Open the WinUI 3 Gallery app and see PasswordBox in action. Pressing the "reveal" button on the right gives a peek at the password text being entered: When the user types in a password box, the default behavior is to show bullets that hide the text being entered: The password box has several states, including these notable ones.Ī password box at rest can show hint text so that the user knows its purpose:

Use a label or placeholder text if the purpose of the password box isn't clear.Use a PasswordBox control to collect a password or other private data, such as a Social Security number.įor more info about choosing the right text control, see the Text controls article. You can disable the reveal button, or provide an alternate mechanism to reveal the password, such as a check box. You can configure the placeholder character.īy default, the password box provides a way for the user to view their password by holding down a reveal button. A password box looks like a text box, except that it renders placeholder characters in place of the text that has been entered. A password box is a text input box that conceals the characters typed into it for the purpose of privacy.
