Skip to main content

DiagramControl.ExportDiagram(Stream, DiagramExportFormat, Rect, Nullable<Double>, Nullable<Double>) Method

Exports the diagram to the specified stream.

Namespace: DevExpress.Xpf.Diagram

Assembly: DevExpress.Xpf.Diagram.v22.1.dll


public void ExportDiagram(
    Stream stream,
    DiagramExportFormat exportFormat,
    Rect exportBounds,
    double? dpi = null,
    double? scale = null


Name Type Description
stream Stream

A System.IO.Stream object to which the created file should be sent.

exportFormat DiagramExportFormat

A DevExpress.Diagram.Core.DiagramExportFormat enumeration value.

exportBounds Rect

A System.Windows.Rect object specifying the rectangle which encompasses the total background area when exporting the diagram.

Optional Parameters

Name Type Default Description
dpi Nullable<Double>


A double value which represents the resolution (in dpi). The minimum supported value is 1.

scale Nullable<Double>


A double value that specifies the scale factor. Values from 0.1 to 30 are supported.


If the dpi and scale parameters are not specified, the ExportDPI and ExportScale property values are used.

See Also