menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IOfficeChartToImageConverter - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IOfficeChartToImageConverter

    Represents the chart to image convertertion.

    Namespace: Syncfusion.OfficeChart
    Assembly: Syncfusion.OfficeChart.Portable.dll
    Syntax
    public interface IOfficeChartToImageConverter

    Properties

    ScalingMode

    Gets or sets a ScalingMode type that represents quality of the converted image.

    Declaration
    ScalingMode ScalingMode { get; set; }
    Property Value
    Type
    ScalingMode
    Examples
    //Open a PowerPoint presentation file
    IPresentation presentation = Presentation.Open("Template.pptx");
    //Create an instance of ChartToImageConverter
    presentation.ChartToImageConverter = new ChartToImageConverter();
    //Set the scaling mode as best
    presentation.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best;
    //Convert the first slide into image
    System.Drawing.Image image = presentation.Slides[0].ConvertToImage(Syncfusion.Drawing.ImageType.Metafile);
    //Save the image as file
    image.Save("slide1.png");          
    //close the presentation instance
    presentation.Close();
    'Open a PowerPoint presentation file
    Dim presentation__1 As IPresentation = Presentation.Open("Template.pptx")
    'Create an instance of ChartToImageConverter
    presentation__1.ChartToImageConverter = New ChartToImageConverter()
    'Set the scaling mode as best
    presentation__1.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best
    'Convert the first slide into image
    Dim image As System.Drawing.Image = presentation__1.Slides(0).ConvertToImage(Syncfusion.Drawing.ImageType.Metafile)
    'Save the image as file
    image.Save("slide1.png")
    'close the presentation instance
    presentation__1.Close()

    Methods

    SaveAsImage(IOfficeChart, Stream)

    Converts the chart to image and saves the image to the specified stream.

    Declaration
    void SaveAsImage(IOfficeChart chart, Stream imageAsStream)
    Parameters
    Type Name Description
    IOfficeChart chart

    Represents the chart object to convert.

    System.IO.Stream imageAsStream

    The stream to save the image

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved