DragAndDrop core
This commit is contained in:
45
Lattice.Themes.Fluent/FluentThemePack.cs
Normal file
45
Lattice.Themes.Fluent/FluentThemePack.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Lattice.Themes.Fluent;
|
||||
|
||||
public class FluentThemePack : ThemePack
|
||||
{
|
||||
private static readonly Uri[] _lightResourceUris = new[]
|
||||
{
|
||||
new Uri("ms-appx:///Lattice.Themes.Fluent/Colors/Light.xaml"),
|
||||
new Uri("ms-appx:///Lattice.Themes.Fluent/Main.xaml")
|
||||
};
|
||||
|
||||
private static readonly Uri[] _darkResourceUris = new[]
|
||||
{
|
||||
new Uri("ms-appx:///Lattice.Themes.Fluent/Colors/Dark.xaml"),
|
||||
new Uri("ms-appx:///Lattice.Themes.Fluent/Main.xaml")
|
||||
};
|
||||
|
||||
public FluentThemePack(bool isDark = false) : base(isDark ? "Fluent Dark" : "Fluent")
|
||||
{
|
||||
Description = isDark ?
|
||||
"Fluent UI 2 Dark Theme (WinUI 3)" :
|
||||
"Fluent UI 2 Light Theme (WinUI 3)";
|
||||
Version = "2.0.0";
|
||||
IsDark = isDark;
|
||||
}
|
||||
|
||||
public override IReadOnlyList<Uri> GetResourceUris()
|
||||
{
|
||||
return IsDark ? _darkResourceUris : _lightResourceUris;
|
||||
}
|
||||
|
||||
public override void OnApply()
|
||||
{
|
||||
base.OnApply();
|
||||
System.Diagnostics.Debug.WriteLine($"Applying Fluent UI 2 Theme: {Name}");
|
||||
|
||||
// Устанавливаем Fluent-специфичные настройки
|
||||
if (Microsoft.UI.Xaml.Application.Current is Microsoft.UI.Xaml.Application app)
|
||||
{
|
||||
// Можно установить Fluent-специфичные настройки приложения
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user