summary refs log tree commit diff
path: root/BatchBeatmapDownloader/App.axaml.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-09 00:26:46 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-09 00:26:46 +0200
commitbef1d59cffaae749661d0a5d90914839a54cc8e7 (patch)
treea05a726d27567bed093e77c194b1e0f9d2ac700f /BatchBeatmapDownloader/App.axaml.cs
downloadBatchBeatmapDownloader-bef1d59cffaae749661d0a5d90914839a54cc8e7.tar.xz
Initial commit HEAD master
Diffstat (limited to 'BatchBeatmapDownloader/App.axaml.cs')
-rw-r--r--BatchBeatmapDownloader/App.axaml.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/BatchBeatmapDownloader/App.axaml.cs b/BatchBeatmapDownloader/App.axaml.cs
new file mode 100644
index 0000000..0a1b270
--- /dev/null
+++ b/BatchBeatmapDownloader/App.axaml.cs
@@ -0,0 +1,23 @@
+using Avalonia;
+using Avalonia.Controls.ApplicationLifetimes;
+using Avalonia.Markup.Xaml;
+using BatchBeatmapDownloader.ViewModels;
+using BatchBeatmapDownloader.Views;
+
+namespace BatchBeatmapDownloader;
+
+public partial class App : Application {
+	public override void Initialize() {
+		AvaloniaXamlLoader.Load(this);
+	}
+
+	public override void OnFrameworkInitializationCompleted() {
+		if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) {
+			desktop.MainWindow = new MainWindow {
+				DataContext = new MainWindowViewModel(),
+			};
+		}
+
+		base.OnFrameworkInitializationCompleted();
+	}
+}