I have basic printing working based on the XPS printing walkthrough. However the legend does not show. I’m not sure what to do about that. Any ideas on how to handle that?
- David Adams asked 9 years ago
- You must login to post comments
Hi David,
The Legend needs to be in the visual tree of the SciChartSurface in order for SciChartSurface.ExportToBitmapSource() to export it. There are several ways to achieve this:
- Include SciChartLegend inside the visual tree of the SciChartSurface by using our LegendModifier.ShowLegend=”True” API.
- Include SciChartLegend inside the visual tree of the SciChartSurface by using a CustomAnnotation to host a SciChartLegend control
- Export a control higher up the visual tree (e.g. a Grid which contains both SciChartSurface and SciChartLegend) using the WPF RenderToBitmap feature.
I would personally recommend (1) as this is our supported API for printing a legend, and the easiest to achieve, but any of them will work!
For more info on the LegendModifier and SciChartLegend API see here.
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
- You must login to post comments
Please login first to submit.