33 lines
923 B
C#
33 lines
923 B
C#
using Lattice.Themes;
|
|
using Lattice.Themes.Fluent;
|
|
using Microsoft.UI.Xaml;
|
|
|
|
namespace Lattice.Example.DragDrop;
|
|
|
|
public partial class App : Application
|
|
{
|
|
private Window? _window;
|
|
|
|
public App()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
|
{
|
|
// Регистрируем Fluent тему
|
|
var themeManager = ThemeManager.Current;
|
|
themeManager.RegisterTheme(new FluentThemePack(false)); // Light тема
|
|
themeManager.RegisterTheme(new FluentThemePack(true)); // Dark тема
|
|
|
|
// Применяем тему по умолчанию
|
|
themeManager.ApplyTheme("Fluent");
|
|
|
|
// Создаем главное окно
|
|
_window = new MainWindow();
|
|
_window.Activate();
|
|
|
|
// Регистрируем окно в трекере
|
|
WindowTracker.Register(_window);
|
|
}
|
|
} |