Files
HandyControl/skills/handycontrol-wpf-theming/SKILL.md
T
2026-10-27 09:12:40 +08:00

15 lines
797 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: handycontrol-wpf-theming
description: "配置 HandyControl WPF 的皮肤、资源字典、动态颜色和主题切换;排查资源键与控件样式,不用于 Avalonia。"
---
# HandyControl WPF 主题
程序集/NuGet 为 `HandyControl`,XAML 命名空间为
`xmlns:hc="https://handyorg.github.io/handycontrol"`,C# 控件命名空间为 `HandyControl.Controls`。
在 `App.xaml` 合并 `pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml`,
然后合并 `pack://application:,,,/HandyControl;component/Themes/Theme.xaml`。
已有主题配置时先检查,避免重复合并。版本和目标框架以使用方项目为准。
按任务阅读 [配置及示例](references/usage.md)。先确认控件实际 CLR 类型和样式 TargetType,再修改资源。