Close when we hit Esc at top-level

This commit is contained in:
Michael Hawker
2024-12-10 00:02:03 -08:00
parent 6810d2cd8a
commit f769446ac9

View File

@@ -50,6 +50,11 @@ public sealed partial class ShellPage :
RootFrame.ForwardStack.Clear();
SearchBox.Focus(Microsoft.UI.Xaml.FocusState.Programmatic);
}
else
{
// If we can't go back then we must be at the top and thus escape again should quit.
WeakReferenceMessenger.Default.Send<QuitMessage>();
}
}
public void Receive(PerformCommandMessage message)