Represents a text control where users can enter a password. Namespace: Microsoft.Surface.Presentation.Controls
Assembly: Microsoft.Surface.Presentation (in Microsoft.Surface.Presentation)
[DefaultEventAttribute("PasswordChanged")] [TemplatePartAttribute(Name="PART_PasswordHost", Type=typeof(ContentPresenter))] public sealed class SurfacePasswordBox : Control
/** @attribute DefaultEventAttribute("PasswordChanged") */ /** @attribute TemplatePartAttribute(Name="PART_PasswordHost", Type=System.Windows.Controls.ContentPresenter) */ public final class SurfacePasswordBox extends Control
When a user types characters into the input field of a SurfacePasswordBox control, the displayed characters are masked using the character specified in the PasswordChar property.
Although the SurfacePasswordBox class does not (for security reasons) derive from the PasswordBox class, SurfacePasswordBox does expose corresponding methods, properties, events, and functionality.
Like the SurfaceTextBox control, a SurfacePasswordBox control automatically displays the on-screen keyboard when it receives focus. Unlike a SurfaceTextBox control, a SurfacePasswordBox control disables visual feedback when keys on the keyboard are pressed. This setting minimizes how much other users can see which keys a user is pressing.
The SurfacePasswordBox control sets the IsNativeInputAllowed property to false. This prevents an input method system from being used to build single characters from multiple keystrokes, where each keystroke would have to be displayed. When this property is false, the keyboard switches to English-only mode and will not switch to other modes. For more information about the input method system, see Globalization Step-by-Step: Input Language: Keyboards and IMEs.
|Microsoft Surface Shell must be running for the SurfacePasswordBox control to bring up the keyboard. If you would like to use similar functionality on an application that will not run on a device made for Surface, use the PasswordBox control. If you want your application to run on all types of devices (devices made for Surface and devices enabled for Windows touch), you will have to dynamically create the correct type of control at run time.|
|Operating System (OS)||Windows 7|
|Software Developer Kit (SDK)||Surface 2.0 |
.NET Framework 4
|Developer environment||Visual Studio 2010, Express or full edition|
Microsoft Expression Blend 4.0 (optional)
|End-user hardware||Devices made for Surface 2.0, or |
Windows Touch computers
Did you find this information useful? Please send us your suggestions and comments.
© Microsoft Corporation. All rights reserved.