The SecurePassword property gets the password currently held by the PasswordBox as aSecureString. The SecureString represents text that should be kept confidential. The text isencrypted for privacy when being used, and deleted from computer memory when no longer needed.
Besides the above discussed properties, the PasswordBox has a very important event calledPasswordChanged. This even occurs when the value of the Password property is changed. Thefollowing code snippet sets this property and shows a property event handler.
Here is the PasswordChanged event handler. You may want to use this property when you need toexecute some code when a password is changed.