【发布时间】:2015-02-16 13:53:35
【问题描述】:
下面是一个流文档
我可以在设计中看到所有 5 个
当我运行程序时,没有找到
如何获得工作的相对路径?
<Paragraph>
<Image Width="50" Height="50" Source="zHelpMain.png" Stretch="Fill"/>
</Paragraph>
<Paragraph>
<Image Width="50" Height="50" Source="Images\VennIntersection.png" Stretch="Fill"/>
</Paragraph>
<Paragraph>
<Image Width="50" Height="50" Source="/Gabe2a;component/Images/VennUnion.png" Stretch="Fill"/>
</Paragraph>
<Paragraph>
<Image Width="50" Height="50" Source="/Images/helpMain.png" Stretch="Fill"/>
</Paragraph>
<Paragraph>
<Image Width="50" Height="50" Source="images\helpMain.png" Stretch="Fill"/>
</Paragraph>
【问题讨论】:
-
如何在程序集中存储图像文件?
-
@HamletHakobyan 我只是将它们放在我项目中的那些位置。我不明白你的问题。
-
@Blam,它们是否定义为您项目中的资源? (检查“构建操作”属性)
-
@ThomasLevesque 问题是文件没有构建操作属性。我会尝试发布图片。
标签: wpf image resources embedded-resource relative-path