267d9b4450
重构主题相关代码,将重复的IsSystemThemeLight方法和主题应用逻辑提取到新的ThemeHelper工具类中 简化多个窗口的主题处理代码,统一使用ThemeHelper进行主题管理
37 lines
884 B
C#
37 lines
884 B
C#
using Ink_Canvas.Helpers;
|
|
using System;
|
|
using System.Windows;
|
|
using System.Windows.Input;
|
|
|
|
namespace Ink_Canvas
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for StopwatchWindow.xaml
|
|
/// </summary>
|
|
public partial class OperatingGuideWindow : Window
|
|
{
|
|
public OperatingGuideWindow()
|
|
{
|
|
InitializeComponent();
|
|
RefreshTheme();
|
|
AnimationsHelper.ShowWithSlideFromBottomAndFade(this, 0.25);
|
|
}
|
|
|
|
private void SCManipulationBoundaryFeedback(object sender, ManipulationBoundaryFeedbackEventArgs e)
|
|
{
|
|
e.Handled = true;
|
|
}
|
|
|
|
public void RefreshTheme()
|
|
{
|
|
try
|
|
{
|
|
ThemeHelper.ApplyTheme(this, MainWindow.Settings);
|
|
InvalidateVisual();
|
|
}
|
|
catch (Exception)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
} |