vb.net - 如何修复图像的“找不到资源”
问题描述
我有一个 wpf 应用程序,它有一个文件夹,其中包含所有需要的图像(称为图像)。在 Images 文件夹中,我有 imgAdd.png 并且文件路径指向我计算机上的正确位置。问题是,当我在 Visual Studio 中打开项目时,我遇到了多个错误,说“无法找到资源 'images/imgadd.png'”。
构建操作设置为资源,文件路径正确,我不确定为什么找不到图片。
ImageSource="imgAdd.png"
Error 3 Cannot locate resource 'images/imgadd.png'.
<CommonControls:ccBilingualButton Canvas.Left="12" Canvas.Top="0" Cursor="Hand" Height="50" HorizontalAlignment="Right" Margin="0,0,86,6" Name="btnAddJustPerson" TabIndex="8" VerticalAlignment="Bottom" Width="75" LabelEnglish="Add" LabelFrench="Add" ImageSource="imgAdd.png" FontWeight="Bold" ImageLocation="Top" Foreground="Black" HorizontalContentAlignment="Center" BorderBrush="DarkBlue" BorderThickness="1" />
解决方案
推荐阅读
- swift - 如何在swift中从viewController类的静态方法中调用非静态方法?
- jquery - 设置光滑的滑块幻灯片显示
- ansible - 成功响应的 ansible 命令模块结果代码非零
- php - 如何使用 rest api 和 php 发送代码 200 和 403
- python - 自动扩展numpy数组
- uicollectionview - UICollectionViewCell 在模拟器中运行后被压扁
- python - 除了 dict、list、set 和 tuple 之外,还有没有内置的容器?
- html - 如何使用 React Router 传递参数?
- sql - 在 SQL 中将 2 聚合值放在 id 值上
- javascript - 如何使用 Puppeteer 选择第一个选项