private void BrowseButton_Click(object sender, RoutedEventArgs e) { string imageFile = VmcStudioUtil.GetImageFile(); if (imageFile != null) { this.ThemeItem.Image = BitmapDecoder.Create(new Uri(imageFile), BitmapCreateOptions.None, BitmapCacheOption.Default).Frames[0]; } }
private ImageSource BrowseForImage() { string imageFile = VmcStudioUtil.GetImageFile(); if (imageFile != null) { MemoryStream bitmapStream = new MemoryStream(File.ReadAllBytes(imageFile)); return(BitmapFrame.Create(bitmapStream)); } return(null); }