From b698d30358446ecd90fd105a40b2bcf58e9ea375 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Fri, 28 Aug 2020 00:20:31 +0800 Subject: [PATCH] fixed #460 --- .../HandyControl_Shared/Controls/Input/PasswordBox.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs index 2d8ec15b..507053da 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs @@ -359,6 +359,15 @@ namespace HandyControl.Controls } } - private void TextBox_TextChanged(object sender, TextChangedEventArgs e) => VerifyData(); + private void TextBox_TextChanged(object sender, TextChangedEventArgs e) + { + VerifyData(); + + if (!IsSafeEnabled && ShowPassword) + { + Password = _textBox.Text; + SetCurrentValue(UnsafePasswordProperty, Password); + } + } } } \ No newline at end of file