다음을 통해 공유


PasswordBox control design guidelines for Windows Phone

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

A PasswordBox control is identical to a TextBox control, except that it conceals the characters typed within it.

This topic contains the following sections.

Appearance and action

A PasswordBox control displays exactly like a TextBox control, except that it shows individual characters only for an instant after they’re entered before normalizing them to bullets. After the user operates the control, or changes are saved, the bullets continue to display in the PasswordBox control. However, the number of bullets that remain won’t correspond to the actual number of characters that the user entered.

When a user taps a PasswordBox control that has already been filled out, the existing bullets become highlighted, allowing the user to edit the field.

Detailed description

Use a PasswordBox control when a more secure version of a TextBox control is required. However, security isn’t the only consideration when using a PasswordBox control. Typos are especially frustrating in a PasswordBox control, so use a TextBox control if this field anticipates more than a word or two of input.

Standard use

Use a PasswordBox control to let the user enter sensitive info that is being concealed from other people who may be watching as it’s entered. Typically, PasswordBox controls are used to collect one-word-length passwords for authentication or authorization.

Despite its name, use a PasswordBox control anywhere in your app where the user has to enter private info, such as a Social Security number.

Design guidelines

Design considerations for a PasswordBox control are similar to those of the TextBox control. However, there are some unique considerations. In desktop and web apps, for example, password fields are sometimes presented in duplicate. To minimize typing in your Windows Phone app, use a single PasswordBox control and handle any authentication errors in the event of a typo by the user.

Customization

Consider adding a dynamic label that confirms the text being entered as soon as it’s completed correctly. This should cut down on mistyped entries and in turn reduce error messages.

See Also

Reference

PasswordBox