Daily Shaarli

All links of one day in a single page.

April 2, 2022

c# - How to bind to a PasswordBox in MVVM - Stack Overflow

With this method, your password remains in a SecureString at all times and therefore provides maximum security. If you really don't care about security or you need the clear text password for a downstream method that requires it (note: most .NET methods that require a password also support a SecureString option, so you may not really need a clear text password even if you think you do), you can just use the Password property instead. Like this: