[英]Image WPF not showing at runtime, after moved MainWindow.xaml
在我的应用程序中,我已移动
MainWindow.xaml
MainWindow.xaml.cs
到我项目中的文件夹app
(当然我在我的App.xaml
StartupUri="app/MainWindow.xaml"
已更改)。
之后,我的图像在运行时不显示图片。:
<Image Source="asd.jpg" HorizontalAlignment="Left" Height="170" Width="201"/>
您还应该将图像Source="/WpfApplication;component/asd.jpg"
更改为Source="/WpfApplication;component/asd.jpg"
:
<Image Source="/WpfApplication;component/asd.jpg" HorizontalAlignment="Left"
Height="170" Width="201"/>
WpfApplication
是您的应用程序的名称。
要么
来源=“ ../ asd.jpg”
因为您现在需要在文件夹中上一层以获取图像
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.