markus / MarkusAutoUpdate / src / NetSparkle.Samples.Avalonia / App.xaml.cs @ d8f5045e
이력 | 보기 | 이력해설 | 다운로드 (609 Bytes)
1 |
using Avalonia; |
---|---|
2 |
using Avalonia.Controls.ApplicationLifetimes; |
3 |
using Avalonia.Markup.Xaml; |
4 |
|
5 |
namespace NetSparkleUpdater.Samples.Avalonia |
6 |
{ |
7 |
public class App : Application |
8 |
{ |
9 |
public override void Initialize() |
10 |
{ |
11 |
AvaloniaXamlLoader.Load(this); |
12 |
} |
13 |
|
14 |
public override void OnFrameworkInitializationCompleted() |
15 |
{ |
16 |
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) |
17 |
{ |
18 |
desktop.MainWindow = new MainWindow(); |
19 |
} |
20 |
|
21 |
base.OnFrameworkInitializationCompleted(); |
22 |
} |
23 |
} |
24 |
} |