bugfix dropdown closing by ESC

This commit is contained in:
Meik
2026-02-20 16:15:28 +01:00
parent 234eacaecf
commit e154353af8
9 changed files with 86 additions and 235 deletions

View File

@@ -18,7 +18,7 @@
Background="Transparent"
WindowStartupLocation="CenterOwner"
DataContext="{Binding RelativeSource={RelativeSource Self}}"
PreviewKeyDown="CustomMessageBox_PreviewKeyDown"
KeyDown="CustomMessageBox_KeyDown"
IsVisibleChanged="BlurInvoker_IsActiveChanged">
<WindowChrome.WindowChrome>

View File

@@ -280,21 +280,15 @@ namespace FasdDesktopUi.Pages.TicketCompletion
#endregion
private void CustomMessageBox_PreviewKeyDown(object sender, KeyEventArgs e)
private void CustomMessageBox_KeyDown(object sender, KeyEventArgs e)
{
switch (e.Key)
if (e.Key != Key.Escape)
{
case Key.Escape:
if (CloseCaseDialogUc?.TryHandleEscapeKey() == true)
{
e.Handled = true;
return;
}
Close_Click();
e.Handled = true;
break;
return;
}
Close_Click();
e.Handled = true;
}
private async Task DoCloseActionAsync()