How to change the folder ImageEditor saves to

Thread is closed for posting
2 posts, 1 answers
  1. MSiccDev
    MSiccDev avatar
    3 posts
    Member since:
    Aug 2011

    Posted 24 Jun 2014 Link to this post

    Is there a way to change the folder for which RadImageEditor saves to?
  2. Answer
    Lance | Manager Technical Support
    Lance | Manager Technical Support avatar
    1193 posts

    Posted 24 Jun 2014 Link to this post

    Hi Marco,

    Yes, you can absolutely save the edited image to a different location. you don't actually set the folder, instead you cancel the saving operation of the ImageEditor and then save the image to your desired location.

    To help demonstrate this, I have written a demo (attached) that saves to the LocalFolder instead. Download and run the app. Click the "edit photo" button and make some changes to the image. When you're done editing it goes back to MainPage.xaml which then displays the edited image directly from LocalFolder.

    You'll find the relevant code on DetailsPage.xaml.cs, here are the highlights from that page...

    private void RadImageEditor_ImageSaving(object sender, Telerik.Windows.Controls.ImageSavingEventArgs e)
         //cancel the ImageSaving event
         e.Cancel = true;
    private async void SaveToLocalfolderLocation(string fileName)
          //grab the modified image
          var img = myImageEditor.ModifiedImage as WriteableBitmap;
          //grab the folder you want
          var folder = Windows.Storage.ApplicationData.Current.LocalFolder;
          //set file properties
          var file = await folder.CreateFileAsync(fileName, Windows.Storage.CreationCollisionOption.ReplaceExisting);
          //save image
          using (Stream stream = await file.OpenStreamForWriteAsync())
               img.SaveJpeg(stream, img.PixelWidth, img.PixelHeight, 0, 100);

    Thank you for contacting Support and thank you for choosing Telerik.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top