mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-05-09 09:56:32 +03:00
close the error dialog by pressing Enter/Esc
This commit is contained in:
@@ -32,13 +32,16 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Action Button -->
|
||||
<Button Grid.Row="1"
|
||||
Content="Got it"
|
||||
Click="Ok_Click"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="25,8"
|
||||
BorderThickness="0"
|
||||
<!-- Action Button -->
|
||||
<Button Grid.Row="1"
|
||||
x:Name="OkButton"
|
||||
Content="Got it"
|
||||
Click="Ok_Click"
|
||||
IsDefault="True"
|
||||
IsCancel="True"
|
||||
HorizontalAlignment="Right"
|
||||
Padding="25,8"
|
||||
BorderThickness="0"
|
||||
CornerRadius="4"
|
||||
Cursor="Hand">
|
||||
<Button.Styles>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Avalonia.Controls;
|
||||
using System;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Threading;
|
||||
|
||||
namespace KeyKeeper.Views;
|
||||
|
||||
@@ -16,4 +18,10 @@ public partial class ErrorDialog : Window
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpened(EventArgs e)
|
||||
{
|
||||
base.OnOpened(e);
|
||||
OkButton.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user