Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class FileFormats - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class FileFormats

    Specifies the filename of the diagram image to be download.

    Inheritance
    System.Object
    FileFormats
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class FileFormats : Enum
    Remarks
    To know more about using file format, refer to this link:
    1. Printing and Exporting
    To apply the SVG file format, use the below code.
    Examples
    <input type="button" value="Export" @onclick="@OnExport" />
    <SfDiagram ID = "diagram" Height="600px" @ref="@Diagram">
    </SfDiagram>
    @code{
        SfDiagram Diagram;
       private void OnExport()
       {
           //Sets the export option for diagram
           IExportOptions Options = new IExportOptions()
           {
               Mode = ExportModes.Data,
               //Sets the format for diagram export
               Format = FileFormats.SVG
           };
           Diagram.ExportDiagram(Options);
       }
    }

    Fields

    BMP

    Diagram will be exported as a BMP file.

    Declaration
    public const FileFormats BMP
    Field Value
    Type Description
    FileFormats

    JPG

    Diagram will be exported as a JPG file

    Declaration
    public const FileFormats JPG
    Field Value
    Type Description
    FileFormats

    PNG

    Diagram will be exported as a PNG file

    Declaration
    public const FileFormats PNG
    Field Value
    Type Description
    FileFormats

    SVG

    Diagram will be exported as an SVG file

    Declaration
    public const FileFormats SVG
    Field Value
    Type Description
    FileFormats

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved