Hi All
I want to export several charts to an xps doc.
I tried the following:
It throws and error here: this.RadChartHeatSetStartSpoils.ExportToXps(fileStream); as the filestream is closed by the first call to ExportToXPS.
This method should not be closing the stream?. Is there any way to exports several charts to the one xps doc?
I want to export several charts to an xps doc.
I tried the following:
private void Button_Click(object sender, RoutedEventArgs e) |
{ |
SaveFileDialog dialog = PrepareSaveDialog(); |
if (!(bool)dialog.ShowDialog()) |
return; |
Stream fileStream = dialog.OpenFile(); |
this.ExportTheFile(fileStream); |
fileStream.Close(); |
} |
private void ExportTheFile(Stream fileStream) |
{ |
this.RadChartColdSetStartSpoils.ExportToXps(fileStream); |
this.RadChartHeatSetStartSpoils.ExportToXps(fileStream); |
this.RadChartComboStartSpoils.ExportToXps(fileStream); |
this.RadChartAverageStartSpoils.ExportToXps(fileStream); |
} |
private SaveFileDialog PrepareSaveDialog() |
{ |
SaveFileDialog dialog = new SaveFileDialog(); |
dialog.DefaultExt = "xps"; |
dialog.Filter = this.GetDefaulExt(); |
return dialog; |
} |
private string GetDefaulExt() |
{ |
return string.Format("*.{0} | {1} File", "xps", "xps"); |
} |
It throws and error here: this.RadChartHeatSetStartSpoils.ExportToXps(fileStream); as the filestream is closed by the first call to ExportToXPS.
This method should not be closing the stream?. Is there any way to exports several charts to the one xps doc?