WPF:找不到 Microsoft_Windows_Themes

标签 wpf themes

我在 WPF 应用程序中收到此错误:

找不到类型“Microsoft_Windows_Themes:ScrollChrome”。验证您没有缺少程序集引用,并且所有引用的程序集均已构建。

有什么想法吗?

最佳答案

确保将此引用添加到控件/页面/资源字典/其他内容的最顶部标签中:

...

xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">

并在项目中添加对 PresentationFramework.Aero 的引用。

关于WPF:找不到 Microsoft_Windows_Themes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2304779/

相关文章:

java - 如何使用两个主题?

shell - 自定义 Oh My Zsh 主题 : long prompts disappear/cut off

css - 从固定宽度到响应式框架的最佳选择

ALT+0 的 WPF 键绑定(bind)不起作用

c# - 设置属性时PropertyChangedEventHandler为null

.net - WPF 如何决定对缺失字符使用哪种字体?

c# - 使用 Ninject 和 wpf 从所有程序集中加载模块

c# - WPF 还是 GTK?哪一个更好

jquery - 为 Web 应用程序设计样式、颜色、感觉、CSS 原型(prototype)

css - GTK 主题 : one version for every major or every minor release?