summary refs log tree commit diff
path: root/BatchBeatmapDownloader/App.axaml.cs
diff options
context:
space:
mode:
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();
+	}
+}