Skip to content

Instantly share code, notes, and snippets.

@kkdai
Created February 19, 2014 13:00
Show Gist options
  • Select an option

  • Save kkdai/9091481 to your computer and use it in GitHub Desktop.

Select an option

Save kkdai/9091481 to your computer and use it in GitHub Desktop.
private async void LoadImage_Click_1(object sender, RoutedEventArgs e)
{
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Image/Tulips.jpg"));
using (IRandomAccessStream fileStream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read))
{
BitmapImage image = new BitmapImage();
image.SetSource(fileStream);
Scenario4Image.Source = image;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment