fix: fixed #1034
This commit is contained in:
1 parent
004cb69877
commit
dd82536d1c
1 file changed
+22
@@ -58,6 +58,28 @@ namespace HandyControl.Controls
|
||||
|
||||
_passwordBoxsGotFocusEventHandler = PasswordBoxsGotFocus;
|
||||
AddHandler(GotFocusEvent, _passwordBoxsGotFocusEventHandler);
|
||||
|
||||
FocusPasswordBox();
|
||||
}
|
||||
|
||||
private void FocusPasswordBox()
|
||||
{
|
||||
if (!IsFocused)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_panel.Children.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_panel.Children.OfType<System.Windows.Controls.PasswordBox>().Any(box => box.IsFocused))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
FocusManager.SetFocusedElement(this, _panel.Children[0]);
|
||||
}
|
||||
|
||||
private void PasswordBoxsPasswordChanged(object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in new issue
Block a user