Blazor

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

    Show / Hide Table of Contents

    Class IExportOptions

    Provides support to export the diagram content to various file format

    Inheritance
    System.Object
    IExportOptions
    Implements
    System.IEquatable<IExportOptions>
    Namespace: Syncfusion.Blazor.Diagrams
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class IExportOptions : Object, IEquatable<IExportOptions>
    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()
        {
          //Sets the Mode for diagram export
          Mode = ExportModes.Data,
          //Sets the custom bound for diagram export
          Bounds = new exportBounds() { x = 10, y = 10, width = 100, height = 100 },
          Format = FileFormats.SVG
        };
        Diagram.ExportDiagram(Options);
       }
      }

    Constructors

    IExportOptions()

    Declaration
    public IExportOptions()

    Properties

    Bounds

    Defines the specific region to be exported from the diagram.

    Declaration
    public object Bounds { get; set; }
    Property Value
    Type Description
    System.Object

    FileName

    Sets the name of the file to be downloaded

    Declaration
    public string FileName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    By default, the FileName is set to Diagram.

    Examples
    IExportOptions Options = new IExportOptions()
     {
        FileName = "format",
     };

    Format

    Sets the file format to be downloaded.

    Declaration
    public FileFormats Format { get; set; }
    Property Value
    Type Description
    FileFormats

    Margin

    Defines the amount of space that has to be left around the diagram.

    Declaration
    public DiagramMargin Margin { get; set; }
    Property Value
    Type Description
    DiagramMargin
    Remarks

    By default, the margin is set to 0 in all the four sides.

    Examples
    IExportOptions Options = new IExportOptions()
    {
       Margin = new Syncfusion.Blazor.Diagrams.MarginModel() { Left = 10, Right = 10, Bottom = 10, Top = 10 }
    };

    Mode

    Sets export mode to diagram content either download or some data format.

    Declaration
    public ExportModes Mode { get; set; }
    Property Value
    Type Description
    ExportModes
    Examples
    IExportOptions Options = new IExportOptions()
    {
      Mode = ExportModes.Download,
    };

    MultiplePage

    Defines whether the diagram must be exported as single or multiple images

    Declaration
    public bool MultiplePage { get; set; }
    Property Value
    Type Description
    System.Boolean

    PageHeight

    Sets the height of the page to be printed

    Declaration
    public double PageHeight { get; set; }
    Property Value
    Type Description
    System.Double
    Examples
         IExportOptions Options = new IExportOptions()
     {
       PageHeight = 400,
     };

    PageOrientation

    Sets the orientation of the page to be printed as either landscape or portrait

    Declaration
    public PageOrientation PageOrientation { get; set; }
    Property Value
    Type Description
    PageOrientation
    Remarks

    By default, the PageOrientation is set to Landscape.

    Examples
    IExportOptions Options = new IExportOptions()
     {
      PageOrientation= PageOrientation.Landscape
     };

    PageWidth

    Sets the width of the page to be printed

    Declaration
    public double PageWidth { get; set; }
    Property Value
    Type Description
    System.Double
    Examples
    IExportOptions Options = new IExportOptions()
    {
     PageWidth = 400,
    };

    PrintOptions

    Sets the property of print options to be printed.

    Declaration
    public bool PrintOptions { get; set; }
    Property Value
    Type Description
    System.Boolean

    Region

    Defines to export any particular region of the diagram.

    Declaration
    public DiagramRegions Region { get; set; }
    Property Value
    Type Description
    DiagramRegions
    Examples
    IExportOptions Options = new IExportOptions()
     {
     Region = DiagramRegions.CustomBounds,
     };

    Stretch

    Sets the aspect ratio for the image.

    Declaration
    public Stretch Stretch { get; set; }
    Property Value
    Type Description
    Stretch
    Examples
         IExportOptions Options = new IExportOptions()
     {
        Stretch = Stretch.None,
     }

    Methods

    Equals(IExportOptions)

    Indicates whether the IExportOptions object is equal to another object of the same type.

    Declaration
    public bool Equals(IExportOptions iExportOptions)
    Parameters
    Type Name Description
    IExportOptions iExportOptions

    Export the diagram content to various file format

    Returns
    Type Description
    System.Boolean

    Returns the options to export diagrams

    Implements

    System.IEquatable<>
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved