예제 #1
0
        private async void ConvertToBitmapImage()
        {
            Cover = new BitmapImage();
            using (InMemoryRandomAccessStream stream = new InMemoryRandomAccessStream())
            {
                await stream.WriteAsync(CoverBytes.AsBuffer());

                stream.Seek(0);
                await Cover.SetSourceAsync(stream);
            }
        }
예제 #2
0
        private async void LoadImage()
        {
            var image = new BitmapImage();

            using (var stream = new InMemoryRandomAccessStream())
            {
                await stream.WriteAsync(CoverBytes.AsBuffer());

                stream.Seek(0);
                await image.SetSourceAsync(stream);
            }
            Cover = image;
        }