wabbajack/Wabbajack.Launcher/App.axaml.cs

26 lines
658 B
C#
Raw Normal View History

2021-10-08 13:16:51 +00:00
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Wabbajack.Launcher.ViewModels;
using Wabbajack.Launcher.Views;
2021-10-23 16:51:17 +00:00
namespace Wabbajack.Launcher;
public class App : Application
2021-10-08 13:16:51 +00:00
{
2021-10-23 16:51:17 +00:00
public override void Initialize()
2021-10-08 13:16:51 +00:00
{
2021-10-23 16:51:17 +00:00
AvaloniaXamlLoader.Load(this);
}
2021-10-08 13:16:51 +00:00
2021-10-23 16:51:17 +00:00
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
desktop.MainWindow = new MainWindow
2021-10-08 13:16:51 +00:00
{
2021-10-23 16:51:17 +00:00
DataContext = new MainWindowViewModel()
};
2021-10-08 13:16:51 +00:00
2021-10-23 16:51:17 +00:00
base.OnFrameworkInitializationCompleted();
2021-10-08 13:16:51 +00:00
}
}