Back to Devexpress

DiagramControl.ExportToImage(Stream, DiagramImageExportFormat, Nullable<Rect>, Nullable<Double>, Nullable<Double>) Method

wpf-devexpress-dot-xpf-dot-diagram-dot-diagramcontrol-dot-exporttoimage-x28-stream-diagramimageexportformat-nullable-rect-nullable-double-nullable-double-x29.md

latest3.7 KB
Original Source

DiagramControl.ExportToImage(Stream, DiagramImageExportFormat, Nullable<Rect>, Nullable<Double>, Nullable<Double>) Method

Exports the diagram to the specified stream in an image format.

Namespace : DevExpress.Xpf.Diagram

Assembly : DevExpress.Xpf.Diagram.v25.2.dll

NuGet Package : DevExpress.Wpf.Diagram

Declaration

csharp
public void ExportToImage(
    Stream stream,
    DiagramImageExportFormat exportFormat = DiagramImageExportFormat.PNG,
    Rect? exportBounds = null,
    double? dpi = null,
    double? scale = null
)
vb
Public Sub ExportToImage(
    stream As Stream,
    exportFormat As DiagramImageExportFormat = DiagramImageExportFormat.PNG,
    exportBounds As Rect? = Nothing,
    dpi As Double? = Nothing,
    scale As Double? = Nothing
)

Parameters

NameTypeDescription
streamStream

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

|

Optional Parameters

NameTypeDefaultDescription
exportFormatDiagramImageExportFormatPNG

A DevExpress.Diagram.Core.DiagramImageExportFormat enumeration value that specifies the image format.

| | exportBounds | Nullable<Rect> | null |

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

| | dpi | Nullable<Double> | null |

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

| | scale | Nullable<Double> | null |

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

|

Remarks

The exportFormat parameter only affects which format is selected by default. End-users can select any other available file format in the invoked dialog window.

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

If the exportBounds parameter is not specified, the PrintExportMode and ExportMargin property values are used.

Use the ExportToSvg method to export the diagram to the SVG image format.

See Also

DiagramControl Class

DiagramControl Members

DevExpress.Xpf.Diagram Namespace