bfr/BFR/App.xaml.cs
adroslice 0c0617df24 Update Avalonia to preview, Minor Refactor
- 0.9.0-preview7
- Set MainWindow's DataContext to itself
2019-11-13 20:40:30 +01:00

23 lines
610 B
C#

using Avalonia;
using Avalonia.Markup.Xaml;
using Avalonia.Controls.ApplicationLifetimes;
namespace BFR
{
public class App : Application
{
public override void Initialize() =>
AvaloniaXamlLoader.Load(this);
public override void OnFrameworkInitializationCompleted()
{
switch (ApplicationLifetime)
{
case IClassicDesktopStyleApplicationLifetime desktop:
desktop.MainWindow = new MainWindow();
break;
}
base.OnFrameworkInitializationCompleted();
}
}
}