开发者

How to read a image from isolated-storage and display it on Image element?

I need to load an image from IsolatedStorage, and display it on an Image UIElement. I have surveyed MSDN, and I found I cannot get an Uri from IsolatedStorage. I could get a stream for the saved jpeg image file.

After I get the jpeg file stream, how do I show it on an Image element? 开发者_C百科


Use BitmapImage.SetSource to read the stream and then set the Image.Source to the BitmapImage:

Stream jpegStream;
var image1 = new BitmapImage();
image1.SetSource(jpegStream);
Image image = new Image();
image.Source = image1;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜