功能更新

This commit is contained in:
GG Z
2026-02-12 21:29:00 +08:00
parent a9faf251be
commit b3479d1f39
342 changed files with 4671 additions and 2223 deletions

View File

@@ -0,0 +1,25 @@
using System.Windows.Markup;
namespace Melskin.Appearance;
/// <summary>
/// ControlsDictionary 类继承自 ResourceDictionary用于定义和管理控件相关的样式资源。
/// 该类在构造时自动加载指定路径下的样式资源文件,并将其设置为资源字典的源。
/// </summary>
/// <remarks>
/// 通过使用此字典,开发者可以方便地访问和应用应用程序中定义的一系列控件样式。这些样式通常包括颜色、字体以及其他视觉属性,
/// 有助于保持应用程序界面的一致性与美观。ControlsDictionary 在初始化时会指向一个预定义的样式文件(通过 ThemeManager.ThemesDictionaryPath 和 "Generic.xaml" 构建的 URI
/// 从而确保了所有引用该字典的控件都能够正确地展示出设计者所期望的外观。
/// </remarks>
[Localizability(LocalizationCategory.Ignore)]
[Ambient]
[UsableDuringInitialization(true)]
public class ControlsDictionary : ResourceDictionary
{
private static string DictionaryUri => $"{ThemeManager.ThemesDictionaryPath}Generic.xaml";
/// <summary>
/// 初始化一个新实例<see cref="ControlsDictionary"/>类。 控件字典的默认构造函数定义<see cref="ResourceDictionary.Source"/>
/// </summary>
public ControlsDictionary() { Source = new Uri(DictionaryUri, UriKind.Absolute); }
}