Skip to content

Commit ac694e1

Browse files
committed
also call PasswordBoxOnPasswordChanged on Loaded
to support passwordboxes which are initially not empty and passwordboxes which are getting Unloaded and Loaded again fixes #213 fixes #193
1 parent c4a64c2 commit ac694e1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

MaterialDesignThemes.Wpf/PasswordFieldAssist.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ private static void ManagedPropertyChangedCallback(DependencyObject dependencyOb
1717
if (passwordBox != null)
1818
{
1919
passwordBox.PasswordChanged -= PasswordBoxOnPasswordChanged;
20+
passwordBox.Loaded -= PasswordBoxOnPasswordChanged;
2021
}
2122

2223
passwordBox = dependencyPropertyChangedEventArgs.NewValue as PasswordBox;
2324
if (passwordBox != null)
2425
{
2526
passwordBox.PasswordChanged += PasswordBoxOnPasswordChanged;
26-
ConfigureHint(passwordBox);
27+
passwordBox.Loaded += PasswordBoxOnPasswordChanged;
2728
}
2829
}
2930

@@ -89,10 +90,5 @@ public static bool GetIsNullOrEmpty(DependencyObject element)
8990
return (bool)element.GetValue(IsNullOrEmptyProperty);
9091
}
9192
}
92-
93-
public static class ProgressBarAssist
94-
{
95-
96-
97-
}
93+
9894
}

0 commit comments

Comments
 (0)