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:
@@ -32,13 +32,16 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Action Button -->
|
<!-- Action Button -->
|
||||||
<Button Grid.Row="1"
|
<Button Grid.Row="1"
|
||||||
Content="Got it"
|
x:Name="OkButton"
|
||||||
Click="Ok_Click"
|
Content="Got it"
|
||||||
HorizontalAlignment="Right"
|
Click="Ok_Click"
|
||||||
Padding="25,8"
|
IsDefault="True"
|
||||||
BorderThickness="0"
|
IsCancel="True"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Padding="25,8"
|
||||||
|
BorderThickness="0"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
Cursor="Hand">
|
Cursor="Hand">
|
||||||
<Button.Styles>
|
<Button.Styles>
|
||||||
|
|||||||
@@ -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