Is it possible to Export the chartArea?

2 posts, 0 answers
  1. amir
    amir avatar
    1 posts
    Member since:
    Sep 2010

    Posted 07 Dec 2010 Link to this post

    Is it possible to Export the chartArea?
  2. Evgeni "Zammy" Petrov
    Admin
    Evgeni "Zammy" Petrov avatar
    168 posts

    Posted 10 Dec 2010 Link to this post

    Hi amir,

     You can export any UIElement you want straight with this class:

    private void ExportChartArea(object sender, RoutedEventArgs e)
    {
        SaveFileDialog dialog = new SaveFileDialog();
        dialog.DefaultExt = "*.png";
        dialog.Filter = "PNG File (*.png) | *.png";
     
        if (!(bool)dialog.ShowDialog())
            return;
     
         Stream fileStream = dialog.OpenFile();
         Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(this.RC1.DefaultView.ChartArea, fileStream, new Telerik.Windows.Media.Imaging.PngBitmapEncoder());
         fileStream.Close();
    }
    Additional information is available in the following location: http://www.telerik.com/help/silverlight/telerik.windows.controls.gridview-telerik.windows.controls.exportextensions.html.

    I hope this information helps.

    Greetings,
    Evgeni "Zammy" Petrov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top