PasswordBox::SecurePassword Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

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

property SecureString^ SecurePassword {
	SecureString^ 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