在wp7中怎么给image赋值

在wp7中如何给image赋值
在wp7中如何给image的source属性赋图片路径值

------解决方案--------------------
前台直接写上路径即可,不过要把图片的Build Action设置成Content,
Copy to output directory设置成Copy always
后台需要使用BitmapImage
BitmapImage bitmapImage=new BitmapImage();
bitmapImage.UriSource=new Uri("1.png",UriKing.Relative);
img.Source=bitmapImage;
如果图片的Build Action为Resources,则路径应写成
/Project;componment/img.png
------解决方案--------------------
探讨

前台直接写上路径即可,不过要把图片的Build Action设置成Content,
Copy to output directory设置成Copy always
后台需要使用BitmapImage
BitmapImage bitmapImage=new BitmapImage();
bitmapImage.UriSource=new Uri("1.png",UriKing.Relati……

------解决方案--------------------
http://www.cnblogs.com/chenping-987123/archive/2011/04/22/2024818.html


http://www.cnblogs.com/chenping-987123/archive/2011/09/29/2195777.html
------解决方案--------------------
在xaml中 设置 source="地址" 如果是本地图片的话 要把图片的属性 Build Action设置为content,这样就行了