在我的项目中,我试图嵌入Avalon向导的源代码,但是有一些奇怪的事情发生了,我无法成功地集成它。
我的自定义控件库中有以下结构
在我的Generic.xaml中,我有以下的删除
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CuratioCMS.Client.UI;Component/Wizard/Themes/Generic.xaml" />
</ResourceDictionary.MergedDictionaries>
在向导/主题/Generic.xaml中,我是如何定义我的MergedDictionaries的
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CuratioCMS.Client.UI;Component/Wizard/Themes/Wizard97.xaml" />
<ResourceDictionary Source="CuratioCMS.Client.UI;Component/Wizard/Themes/WizardAero.xaml" />
<ResourceDictionary Source="CuratioCMS.Client.UI;Component/Wizard/Themes/AeroWizardHeader.xaml" />
</ResourceDictionary.MergedDictionaries>根据Avalon实现,在Aero.NormalColor.xaml中还提供了一个Aero.NormalColor.xaml,如下所示
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CuratioCMS.Client.UI;Component/Wizard/Themes/AeroWizardHeader.xaml" />
</ResourceDictionary.MergedDictionaries>我的问题是,我无法在我的项目中使用我自己的类库作为设计器抛出异常,即:'wizard/themes/curatiocms.client.ui;component/wizard/themes/wizard97.xaml'.不能定位资源。
如果我改变向导/主题/Generic.xaml内的路径,那么错误就消失了,但是Wizard无法提供Aero功能,甚至设计器也不能正常工作。
我还要说,我决定采用这种架构,因为根据扩展的WPF工具包,这是非常干净的方式。
有人能帮我吗?
发布于 2012-10-07 23:36:47
您试过使用完整的包URI语法吗?
您试过将“组件”更改为“组件”吗?还要确保字典将其构建操作设置为Resource,并且正确引用了CuratioCMS.Client.UI程序集。
https://stackoverflow.com/questions/12773373
复制相似问题