-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
App.axaml.cs
52 lines (47 loc) · 1.57 KB
/
App.axaml.cs
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Avalonia.Markup.Xaml.Styling;
using Avalonia.Styling;
using System;
namespace Aura.UI.ControlsGallery
{
public class App : Application
{
public override void Initialize()
{
Styles.Insert(0, FluentLight);
AvaloniaXamlLoader.Load(this);
}
public override void OnFrameworkInitializationCompleted()
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = new MainWindow();
}
base.OnFrameworkInitializationCompleted();
}
public static Styles FluentDark = new Styles
{
new StyleInclude(new Uri("avares://Aura.UI.ControlsGallery/Styles"))
{
Source = new Uri("avares://Avalonia.Themes.Fluent/FluentDark.xaml")
},
new StyleInclude(new Uri("avares://Aura.UI.ControlsGallery/Styles"))
{
Source = new Uri("avares://Aura.UI/AuraUI.xaml")
}
};
public static Styles FluentLight = new Styles
{
new StyleInclude(new Uri("avares://Aura.UI.ControlsGallery/Styles"))
{
Source = new Uri("avares://Avalonia.Themes.Fluent/FluentLight.xaml")
},
new StyleInclude(new Uri("avares://Aura.UI.ControlsGallery/Styles"))
{
Source = new Uri("avares://Aura.UI/AuraUI.xaml")
}
};
}
}