RadCatesianChart Export To Image?

3 posts, 1 answers
  1. Hovhannes
    Hovhannes avatar
    2 posts
    Member since:
    Jan 2012

    Posted 23 Jan 2012 Link to this post

    Dear experts,

    I was used RadChart which work almost fine, but as the RadCatesianChart is new one and has some good performance and new features i desided to use it instead of  RadChart, but now i have some problem I can not find ExportToImage feature. Is it has such kind a feature and if no, is it planned to add it in the future releases?

    Thanks,
    Hovhannes
  2. Answer
    Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 26 Jan 2012 Link to this post

    Hi,

    Thank you for contacting Telerik Support!

    You can use the ExportToImage extension method as demonstrated below:
    private void Export_Click(object sender, RoutedEventArgs e)
    {
     SaveFileDialog sfd = new SaveFileDialog();
     sfd.DefaultExt = "png";
     sfd.Filter = "PNG File (*.png) | *.png";
     if ((bool)sfd.ShowDialog())
     {
       using (var stream = sfd.OpenFile())
       {
         Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(RadChart1, stream, new PngBitmapEncoder());
       }
     }
    }

    Hope this helps.

    Regards,
    Petar Marchev
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft banner
  4. Hovhannes
    Hovhannes avatar
    2 posts
    Member since:
    Jan 2012

    Posted 26 Jan 2012 Link to this post

    Great! Thank you very much!
Back to Top