在一个相当大的控件库中工作generic.xaml会失去控制。我想通过控制来分割它(尽管对于目前只包含一些简单名称空间的名称空间来说,只需要一次)。
为此,我正在添加更多的资源字典。
然后,在generic.xaml中添加:
<ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Themes/Generic.Core.xaml" /> </ResourceDictionary.MergedDictionaries>
还有…获取加载错误。
正确的URL是什么?
这是:
我阅读了有关包URL的msdn部分,但对于看起来如此简单的内容来说,这听起来非常复杂。
请帮助。
找到它:
<ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Tradex.Presentation;component/Themes/Generic.Core.xaml" /> </ResourceDictionary.MergedDictionaries>
那是有效的。 需要给程序集加前缀(替换 Tradex.Presentation 以程序集名称)并以 component 项目。
Tradex.Presentation
component