DiagramImageExporter
StockSharp.Xaml.Diagram.Maui.Export
Exports diagrams to images in MAUI. Note: Full image export implementation is platform-specific and may require additional platform-specific code.
Methods
ExportToImageAsync
public static Task<byte[]> ExportToImageAsync(GraphicsView diagramView, DiagramExportOptions options)
result = DiagramImageExporter.ExportToImageAsync(diagramView, options)
Exports a diagram view to an image byte array.
- diagramView
- The GraphicsView containing the diagram.
- options
- Export options.
Returns: Image bytes or null if export failed.
ExportToJpegAsync
public static Task<byte[]> ExportToJpegAsync(GraphicsView diagramView, DiagramExportOptions options)
result = DiagramImageExporter.ExportToJpegAsync(diagramView, options)
Exports a diagram view to a JPEG byte array.
- diagramView
- The GraphicsView containing the diagram.
- options
- Export options.
Returns: JPEG image bytes or null if export failed.
ExportToPngAsync
public static Task<byte[]> ExportToPngAsync(GraphicsView diagramView, DiagramExportOptions options)
result = DiagramImageExporter.ExportToPngAsync(diagramView, options)
Exports a diagram view to a PNG byte array.
- diagramView
- The GraphicsView containing the diagram.
- options
- Export options.
Returns: PNG image bytes or null if export failed.
SaveToFileAsync
public static Task<bool> SaveToFileAsync(GraphicsView diagramView, string filePath, DiagramExportOptions options)
result = DiagramImageExporter.SaveToFileAsync(diagramView, filePath, options)
Saves a diagram view to a file.
- diagramView
- The GraphicsView containing the diagram.
- filePath
- Target file path.
- options
- Export options.
Returns: True if successful.