首页 > 技术文章 > RT/Metro商店应用如何如何获取图片的宽高

songxingzhu 2015-05-25 10:31 原文

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;

 

 

 

 

推荐阅读