Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PasswordBox.SecurePassword Property

 

Gets the password currently held by the PasswordBox as a SecureString.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public SecureString SecurePassword { get; }

Property Value

Type: System.Security.SecureString

A secure string representing the password currently held by the PasswordBox.

When you get the Password property value, you expose the password as plain text in memory. To avoid this potential security risk, use the SecurePassword property to get the password as a SecureString.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft