0
我的要求是从我目前的刺激探索中获取来自图像文件夹的图像。如何从我的项目图像文件夹中获取图像URL?
,我们需要从图片文件夹的访问图像。
我的代码在处给出一个错误ImageSource MoleImage = new BitmapImage(new Uri(“。Images/Section5Q4femail1.pngeMole”));线
private Image CreateImage()
{
Image Mole = new Image();
Mole.Width = 25;
Mole.Height = 25;
ImageSource MoleImage = new BitmapImage(new Uri(".Images/Section5Q4femail1.pngeMole"));
Mole.Source = MoleImage;
return Mole;
}
我认为这将帮助你看到这个链接http://stackoverflow.com/questions/17704304/get-all-images-from-a-folder-in-my-project-solution –
从Xaml绑定到它imo 。 –