Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public byte[] temp;
- private void savebutton_Click (object sender, RoutedEventArgs e)
- {
- var library = new MediaLibrary();
- library.SavePicture(textBox1.Text.ToString(),temp);
- NavigationService.GoBack();
- }
- void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
- {
- if (e.Error == null && !e.Cancelled)
- {
- try
- {
- BitmapImage image = new BitmapImage();
- image.SetSource(e.Result);
- image1.Source = image;
- temp = new byte[e.Result.Length];
- }
- catch (Exception ex)
- {
- //Exception handle appropriately for your app
- MessageBox.Show(ex.ToString());
- }
- }
- else
- {
- //Either cancelled or error handle appropriately for your app
- }
- }
Add Comment
Please, Sign In to add comment