混合-资源无法解析 [英] Blend - the resource could not be resolve

查看:66
本文介绍了混合-资源无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

在我的VS 2017项目中,我使用资源库作为DLL文件添加到项目引用中.在Visual Studio项目中,我没有任何问题.但是,当我尝试使用该库并将其添加到Blend中的引用中时,出现了错误:
该资源无法解析."如何解决这个问题?

In my VS 2017 project I'm using resource library as DLL file added to project references. In Visual Studio project I don't have any problem. But when I try to use that library and add it to references in Blend I got error:
"The resource could not be resolved." How to solve that problem?

库和Blend项目中的.Net Frameworks相同.

.Net Frameworks in library and Blend project are the same.

谢谢.

推荐答案

您能显示代码如何在DLL中加载资源吗?

Can you show the code how do you load the resource in DLL?

您可能需要跨以下目录加载资源字典或DLL.

You maybe need load a Resource Dictionary across DLL or project like below.

<ResourceDictionary Source="pack://application:,,,/YourAssembly;component/Subfolder/YourResourceFile.xaml"/>

Windows Presentation Foundation中的打包URI

Pack URIs in Windows Presentation Foundation

https://msdn.microsoft.com/en-us/library/aa970069(VS.85).aspx

最好的问候,

鲍勃


这篇关于混合-资源无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆