|
|
|
@ -1,14 +1,67 @@ |
|
|
|
using System; |
|
|
|
using Avalonia; |
|
|
|
using Avalonia.Controls.ApplicationLifetimes; |
|
|
|
using Avalonia.Markup.Xaml; |
|
|
|
using Avalonia.Markup.Xaml.Styling; |
|
|
|
using Avalonia.Styling; |
|
|
|
|
|
|
|
namespace ControlCatalog |
|
|
|
{ |
|
|
|
public class App : Application |
|
|
|
{ |
|
|
|
public static Styles FluentDark = new Styles |
|
|
|
{ |
|
|
|
new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) |
|
|
|
{ |
|
|
|
Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseDark.xaml?assembly=Avalonia.Themes.Default") |
|
|
|
}, |
|
|
|
new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) |
|
|
|
{ |
|
|
|
Source = new Uri("resm:Avalonia.Themes.Fluent.Accents.FluentDark.xaml?assembly=Avalonia.Themes.Fluent") |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
public static Styles FluentLight = new Styles |
|
|
|
{ |
|
|
|
new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) |
|
|
|
{ |
|
|
|
Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default") |
|
|
|
}, |
|
|
|
new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) |
|
|
|
{ |
|
|
|
Source = new Uri("resm:Avalonia.Themes.Fluent.Accents.FluentLight.xaml?assembly=Avalonia.Themes.Fluent") |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
public static Styles DefaultLight = new Styles |
|
|
|
{ |
|
|
|
new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) |
|
|
|
{ |
|
|
|
Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default") |
|
|
|
}, |
|
|
|
new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) |
|
|
|
{ |
|
|
|
Source = new Uri("resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default") |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
public static Styles DefaultDark = new Styles |
|
|
|
{ |
|
|
|
new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) |
|
|
|
{ |
|
|
|
Source = new Uri("resm:Avalonia.Themes.Default.Accents.BaseDark.xaml?assembly=Avalonia.Themes.Default") |
|
|
|
}, |
|
|
|
new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog")) |
|
|
|
{ |
|
|
|
Source = new Uri("resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default") |
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
public override void Initialize() |
|
|
|
{ |
|
|
|
AvaloniaXamlLoader.Load(this); |
|
|
|
|
|
|
|
Styles.Insert(0, FluentDark); |
|
|
|
} |
|
|
|
|
|
|
|
public override void OnFrameworkInitializationCompleted() |
|
|
|
|