使用C#从galery wp7加载图像 [英] load image from galery wp7 with c#

查看:67
本文介绍了使用C#从galery wp7加载图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,全部,
我在使用C#vs2010编程wp7时遇到了一些问题.
在我的项目中,我想从图库中加载图像,
我正在针对Windows Mobile方法在vs2008中构建代码,但在Windows Phone 7中无法正常工作.
这是我的Windows Mobile代码

hello all,,,
I have a little problem in programing wp7 with c# vs2010.
in my project, i want to load image from galery,
i am build code like in vs2008 for windows mobile method, but not work in windows phone 7.
here my code for windows mobile

Bitmap Newimg = new Bitmap(@"\My Documents\my pictures\spring.jpg");
pictureBox1.Image = Newimg;


我在WP7上使用上面的方法,但不起作用,
请告诉我使用vs2010 c#在wp7中加载图像的方法
谢谢.


i am use method above for WP7, but not work,
please tell me for load image in wp7 with vs2010 c#
thanks.

推荐答案

尝试一下可能会起作用
Try this it may work
pictureBox1.Image = Image.FromImage(Newimg);


这篇关于使用C#从galery wp7加载图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆