From 566e4984b5f008f0b79aaef8b2417697e67a834e Mon Sep 17 00:00:00 2001 From: Kalakoi Date: Thu, 22 May 2025 12:27:23 -0400 Subject: [PATCH] Closing home page now cleanly closes entire application. --- osrs-toolbox/Views/HomePageView.xaml | 6 +++--- osrs-toolbox/Views/HomePageView.xaml.cs | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/osrs-toolbox/Views/HomePageView.xaml b/osrs-toolbox/Views/HomePageView.xaml index ed1c7e1..1057787 100644 --- a/osrs-toolbox/Views/HomePageView.xaml +++ b/osrs-toolbox/Views/HomePageView.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:osrs_toolbox" mc:Ignorable="d" - Title="OSRS Toolbox" d:Height="450" d:Width="800" SizeToContent="WidthAndHeight"> + Title="OSRS Toolbox" d:Height="450" d:Width="800" SizeToContent="WidthAndHeight" Closed="Window_Closed"> @@ -25,12 +25,12 @@ - + - + diff --git a/osrs-toolbox/Views/HomePageView.xaml.cs b/osrs-toolbox/Views/HomePageView.xaml.cs index cd94ffb..8f634ae 100644 --- a/osrs-toolbox/Views/HomePageView.xaml.cs +++ b/osrs-toolbox/Views/HomePageView.xaml.cs @@ -26,5 +26,12 @@ namespace osrs_toolbox InitializeComponent(); Current = this; } + + private void Window_Closed(object sender, EventArgs e) + { + foreach (Window w in Application.Current.Windows) + w.Close(); + Application.Current.Shutdown(); + } } }