【发布时间】:2018-07-01 22:23:14
【问题描述】:
我有一个 WPF 应用程序(项目 A),其中有一个资源字典文件 Global.xaml。在这个文件中我指的是
<BitmapImage x:Key="Test" UriSource="..\Images\Test.png">
上面的行引用了下面路径中的图像
pack://application:,,,/Assembly of Project A;component/Images/Test.png
现在我将图像移动到共享项目(共享项目 A)并在项目 A 中被引用。那么 UriSource 是什么?
我尝试提供共享项目的组装 A;component/Images/Test.png
但它没有从共享项目中获取图像。
【问题讨论】:
-
如果您遇到问题,相关问题:Pack URI to image embedded in a resx file
标签: c# wpf shared-project