[英]how to store an image received from the web and display it in the windows phone 7 application
[英]How to store and display image in WPF application?
在我的WPF应用程序中,我想上传图像。 规格是
Images
文件夹中。 然后, image-1
的Image
控件中 您能给我一个简单的方法吗?
您可以将图像存储在项目本身的任何文件夹中,也可以通过随代码引用它来使用该文件夹,并根据需要使用该图像。在http://computingandcareer.blogspot.com上尝试一些示例代码
在您的全局样式文件中添加图像
<BitmapImage x:Key="MyImage" Source="..\\MyImage.png" />
使用静态资源引用图像
<Image Source="{StaticResource ResourceKey=MyImage}" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.