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;
精彩评论