首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在WPF中引用dll中的主题

在WPF中引用dll中的主题
EN

Stack Overflow用户
提问于 2010-08-12 19:48:48
回答 1查看 3K关注 0票数 1

我使用的是一个开源的wpf TreeListView控件。该控件是一个库项目,其中有一个包含一些xaml主题文件的主题文件夹。在我的wpf项目中,我获得了对控件dll的引用,我想知道如何在app.xaml中引用dll主题。我试过这样做,但它抛出异常,说找不到treelistview程序集

代码语言:javascript
复制
<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>           
            <ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml" />
            <ResourceDictionary Source="/TreeListView;component/themes/Aero.NormalColor.xaml" />
    </ResourceDictionary>
</Application.Resources>

目前,我必须将wpf项目中的所有主题文件复制到本地,才能使其像这样工作。

代码语言:javascript
复制
<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>               
            <ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml" />
         <ResourceDictionary Source="themes/aero.normalcolor.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

有没有一种方法可以直接在TreeListView dll中引用主题文件,就像引用默认主题一样。

等待Nabeel

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-08-12 19:51:56

我自己弄明白了,我使用了错误的汇编文件名。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3467285

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档