the unlock password text box now takes focus automatically

This commit is contained in:
2026-03-26 20:14:42 +03:00
parent 4594fcbf4d
commit 120c99dbb9
2 changed files with 7 additions and 1 deletions

View File

@@ -153,7 +153,8 @@
<TextBox x:Name="UnlockPasswordEdit"
Text="{Binding UnlockPassword, Mode=TwoWay}"
PasswordChar="*"
Width="450" />
Width="450"
Loaded="UnlockPasswordEdit_Loaded" />
<Button x:Name="UnlockButton"
Command="{Binding TryUnlock}"

View File

@@ -39,6 +39,11 @@ public partial class RepositoryWindow : Window
vm.ResetLockTimer();
}
private void UnlockPasswordEdit_Loaded(object? sender, RoutedEventArgs e)
{
(sender as TextBox)?.Focus();
}
private async void RepositoryWindow_Closing(object? sender, WindowClosingEventArgs e)
{
if (allowClose || closeConfirmationShown)