Windows Phone开发之图片控件Image及定义URI
[html]
<image grid.column="1"
grid.columnspan="3"
grid.row="5"
grid.rowspan="2"
verticalalignment="stretch"
horizontalalignment="stretch"
name="image1"
stretch="uniformtofill"
source="/phoneapp4;component/images/jellyfish.jpg"
margin="8,0,72,0" />
解释:
stretch="uniformtofill" 可以调整大小有拉伸效果
stretch="fill" 任意拉伸调整大小
stretch="uniform" 按照原图比例调整大小
source="/phoneapp4;component/images/jellyfish.jpg" 图片引用路径
后台代码修改图片:
system.windows.media.imaging.bitmapimage myimage = new bitmapimage();
myimage.urisource = new uri("/phoneapp4;component/images/tulips.jpg", urikind.relative);
image1.source = myimage;
摘自 whuarui2010的专栏
上一篇: seo利用博客做外链最有效的方法
下一篇: Bootstrap开发框架界面的调整处理