Export (0) Print
Expand All

PasswordBox.Password Property

Gets or sets the password currently held by the PasswordBox.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public string Password { get; set; }
/** @property */
public String get_Password ()

/** @property */
public void set_Password (String value)

public function get Password () : String

public function set Password (value : String)

<object Password="string" .../>

Property Value

A string representing the password currently help by the PasswordBox. The default value is Empty.

Setting this property to null causes the underlying password to be set to Empty.

The following example shows how to set the Password property programmatically.

PasswordBox pwdBox = new PasswordBox();
pwdBox.Password = "Open Sesame!";

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2015 Microsoft