PasswordBox control design guidelines for Windows Phone

July 21, 2014

Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 | Windows Phone OS 7.1

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

UI_PasswordBox

This topic contains the following sections.

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.

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.

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 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.

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.

Show:
© 2014 Microsoft