欢迎来到我的的博客园,祝大家学有所成,早点实现自己的人生理想。

RT/Metro商店应用如何如何获取图片的宽高

RT/Metro商店应用如何如何获取图片的宽高




var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/test.jpg", UriKind.RelativeOrAbsolute)); ImageProperties imageProperties = await file.Properties.GetImagePropertiesAsync(); canvas.Width = imageProperties.Width; canvas.Height = imageProperties.Height;

 

 

 

 

posted @ 2015-05-25 10:31  宋兴柱  阅读(176)  评论(0编辑  收藏  举报