2025-02-10 20:53:40 +08:00
|
|
|
|
using System.Windows;
|
2024-10-27 00:19:48 +08:00
|
|
|
|
using System.Windows.Media;
|
2025-04-24 20:56:44 +08:00
|
|
|
|
|
2025-02-10 20:53:40 +08:00
|
|
|
|
using WPFluent.Appearance;
|
2024-10-27 00:19:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-02-10 20:53:40 +08:00
|
|
|
|
namespace ShrlAlgo.Addin.Test;
|
2024-10-27 00:19:48 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// FluentWindow.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
2025-04-24 20:56:44 +08:00
|
|
|
|
public partial class FluentWindow
|
2024-10-27 00:19:48 +08:00
|
|
|
|
{
|
|
|
|
|
|
public FluentWindow()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
2025-05-05 17:04:06 +08:00
|
|
|
|
//ThemeManager.ChangeAppTheme(this);
|
|
|
|
|
|
//ThemeManager.Changed -= ApplicationThemeManager_Changed;
|
|
|
|
|
|
//ThemeManager.Changed += ApplicationThemeManager_Changed;
|
2024-10-27 00:19:48 +08:00
|
|
|
|
}
|
2025-05-05 17:04:06 +08:00
|
|
|
|
private void ApplicationThemeManager_Changed(ThemeType currentApplicationTheme, Color systemAccent)
|
2024-10-27 00:19:48 +08:00
|
|
|
|
{
|
2025-05-05 17:04:06 +08:00
|
|
|
|
//ThemeManager.ChangeAppTheme(this);
|
2024-10-27 00:19:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void Button_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
2025-05-05 17:04:06 +08:00
|
|
|
|
//if (ThemeManager.GetAppTheme() == ThemeType.Light)
|
2025-04-24 20:56:44 +08:00
|
|
|
|
//{
|
2025-05-05 17:04:06 +08:00
|
|
|
|
// ThemeManager.ChangeAppTheme(ThemeType.Dark);
|
2025-04-24 20:56:44 +08:00
|
|
|
|
//}
|
|
|
|
|
|
//else
|
|
|
|
|
|
//{
|
2025-05-05 17:04:06 +08:00
|
|
|
|
// ThemeManager.ChangeAppTheme(ThemeType.Light);
|
2025-04-24 20:56:44 +08:00
|
|
|
|
//}
|
2024-10-27 00:19:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|