This is a migrated thread and some comments may be shown as answers.

Is it possible to Export the chartArea?

1 Answer 48 Views
Chart
This is a migrated thread and some comments may be shown as answers.
amir
Top achievements
Rank 1
amir asked on 07 Dec 2010, 12:34 PM
Is it possible to Export the chartArea?

1 Answer, 1 is accepted

Sort by
0
Evgeni "Zammy" Petrov
Telerik team
answered on 10 Dec 2010, 09:28 AM
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
Tags
Chart
Asked by
amir
Top achievements
Rank 1
Answers by
Evgeni "Zammy" Petrov
Telerik team
Share this question
or