private async Task LoadImageAsync() { byte[] code = //call to third party API for byte array System.IO.MemoryStream ms = new MemoryStream(code); var bitmapImg = new Windows.UI.Xaml.Media.Imaging.BitmapImage(); Windows.Storage.Streams.InMemoryRandomAccessStream imras = new Windows.Storage.Streams.InMemoryRandomAccessStream(); Windows.Storage.Streams.DataWriter write = new Windows.Storage.Streams.DataWriter(imras.GetOutputStreamAt(0)); write.WriteBytes(code); await write.StoreAsync(); bitmapImg.SetSourceAsync(imras); pictureBox1.Source = bitmapImg; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)