Добавлен example
This commit is contained in:
33
Lattice.Example.DragDrop/App.xaml.cs
Normal file
33
Lattice.Example.DragDrop/App.xaml.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user