英文:
Use ResourceDictionary from Windows.UI.Xaml namespace
问题
我正试图在我的现有项目中使用来自 Windows.UI.Xaml 命名空间的 ResourceDictionary.ThemeDictionaries 属性,但我已经有了来自 System.Windows.ResourceDictionary 的 ResourceDictionary。我无法弄清楚如何使用来自 Windows.UI.Xaml 的那个,以便我可以拥有 ThemeDictionaries。
你有任何想法吗?
谢谢!
英文:
I am trying to use the ResourceDictionary.ThemeDictionaries property from Namespace Windows.UI.Xaml on my existing project, but I already have the ResourceDictionary from System.Windows.ResourceDictionary. I cannot figure out how can I use the one from Windows.UI.Xaml, so that I can have the ThemeDictionaries.
enter image description here
enter image description here
Do you have any ideas?
Thanks!
答案1
得分: 0
I am afraid that ThemeDictionaries
和 Windows.UI.Xaml
命名空间中的 ResourceDictionary
是通用 Windows 平台 (UWP) 的东西,不适用于 WPF。
WPF 的 ResourceDictionary
和 UWP 的 ResourceDictionary
不是相同的东西。它们不可互换,即不能在 WPF 和 UWP 应用程序中同时重用它们。
英文:
I am afraid that ThemeDictionaries
and the ResourceDictionary
in the Windows.UI.Xaml
namespace is a Universal Windows Platform (UWP) thing that is not applicable to WPF.
A WPF ResourceDictionary
and a UWP ResourceDictionary
are not the same thing. They are not interchangeable, i.e. you cannot reuse them in both WPF and UWP apps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论