-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.axaml.cs
More file actions
27 lines (24 loc) · 862 Bytes
/
Copy pathApp.axaml.cs
File metadata and controls
27 lines (24 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
namespace BatteryDischarger
{
// Connects Avalonia's loaded application resources to the desktop window lifetime.
public partial class App : Application
{
// Loads the application-level Avalonia resources declared in App.axaml.
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
// Creates the main window only for the desktop lifetime supported by this application.
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
}
base.OnFrameworkInitializationCompleted();
}
}
}