I want to bind a Passwordbox in the XAML code. Now I found out that it isn´t possible to bind it because you haven´t any dependency property.
For my case I don´t need any security in my Application. I just don´t want to display clear text to the user. Is there any other option to realize a kind of passwordbox with a textbox or so on?
The Password
property is not a dependency property -- for security reasons. You can easily get the plain-text password, though.
<PasswordBox
x:Name="passwordBox"
PasswordChanged="OnPasswordChanged" />
private void OnPasswordChanged(
object sender,
RoutedEventArgs e)
{
Debug.WriteLine(passwordBox.Password);
}
PasswordBox
using attached propertiesIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With