Exporting in WPF Diagram (SfDiagram)

SfDiagram provides support to export the desired region of the Diagram to desired formats.Contents of the SfDiagram can be exported as raster image files by using Export method.

The exporting can be customized by using ExportSettings property of the SfDiagram.

SfDiagram can be exported in the following File formats.

  • PNG
  • JPEG
  • TIFF
  • GIF
  • BMP
//Basic and customization properties for exporting
ExportSettings settings = new ExportSettings()
   ImageStretch = Stretch.Fill,
   ExportMode = ExportMode.Content
Diagram.ExportSettings = settings;         
//Method to Export the SfDiagram

Export To PDF

SfDiagram provides support to export the Diagram as XPS format by using the IsSaveToXps property of ExportSettings.

We can convert the XPS document into PDF file through Syncfusion.XPS.XPSToPdfConverter.Please refer to the KB link to Export the SfDiagram as PDF.