0c0617df24
- 0.9.0-preview7 - Set MainWindow's DataContext to itself
23 lines
610 B
C#
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();
|
|
}
|
|
}
|
|
} |