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