Monday, March 31, 2014

Save DataPackageView.Properties.Thumbnail to disk

Hi,


Try some codes below:




// Lets say the byte array represents the data we want to present as a storage file.
var fileBytes = new byte[200];var streamReference =DataPackageView.Properties.Thumbnail;
// Creating the streamed storage file.
var streamedStorageFile = await StorageFile.CreateStreamedFileAsync("MyFileName.jpg", async stream =>
{
await stream.WriteAsync(fileBytes.AsBuffer());
await stream.FlushAsync();
stream.Dispose();
}, streamReference);

Please refer to the link get more information:


http://ift.tt/1fIFQzX


Best Wishes!




We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


No comments:

Post a Comment