From 82fe63d009b2323a7a16f60ce4f8c928adfea91f Mon Sep 17 00:00:00 2001 From: Indigo744 Date: Mon, 9 May 2022 12:26:44 +0200 Subject: [PATCH] Use Shutdown() instead of Close() to terminate the application --- src/VisualJsonEditor/Views/MainWindow.xaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VisualJsonEditor/Views/MainWindow.xaml.cs b/src/VisualJsonEditor/Views/MainWindow.xaml.cs index 25af788..43c7b8b 100644 --- a/src/VisualJsonEditor/Views/MainWindow.xaml.cs +++ b/src/VisualJsonEditor/Views/MainWindow.xaml.cs @@ -134,9 +134,9 @@ private async void OnWindowClosing(object sender, CancelEventArgs args) return; } - Closing -= OnWindowClosing; SaveConfiguration(); - await Dispatcher.InvokeAsync(Close); + + Application.Current.Shutdown(); } private void OnShowAboutWindow(object sender, RoutedEventArgs e)