-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.axaml.cs
More file actions
35 lines (31 loc) · 1.02 KB
/
Copy pathApp.axaml.cs
File metadata and controls
35 lines (31 loc) · 1.02 KB
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
28
29
30
31
32
33
34
35
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
namespace SerialVolumeControl;
/// <summary>
/// Represents the application entry point for the SerialVolumeControl Avalonia application.
/// </summary>
public partial class App : Application
{
/// <summary>
/// Initializes the application and loads the XAML markup.
/// Called during the application startup.
/// </summary>
public override void Initialize()
{
AvaloniaXamlLoader.Load(this);
}
/// <summary>
/// Called when the Avalonia framework has completed initialization.
/// Sets the main window for desktop-style application lifetimes.
/// </summary>
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
// Set the main window of the application.
desktop.MainWindow = new MainWindow();
}
base.OnFrameworkInitializationCompleted();
}
}