Class
ExportExtensions

This class provides methods to export the content of a generic FrameworkElement to image, Excel image, and XPS image formats.

Definition

Namespace:Telerik.Windows.Media.Imaging

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
public static class ExportExtensions

Inheritance: objectExportExtensions

Methods

ExportToExcelMLImage(FrameworkElement, Stream)

Exports an image of the given element to the Excel file.

Declaration

cs-api-definition
public static void ExportToExcelMLImage(FrameworkElement element, Stream stream)

Parameters

element

FrameworkElement

FrameworkElement to get image from.

stream

Stream

Stream.

ExportToExcelMLImage(FrameworkElement, string)

Exports an image of the given element to the Excel file.

Declaration

cs-api-definition
public static void ExportToExcelMLImage(FrameworkElement element, string fileName)

Parameters

element

FrameworkElement

FrameworkElement to get the image from.

fileName

string

Name of the Excel file.

ExportToImage(FrameworkElement, Stream, BitmapEncoder)

Exports an image of the given element to stream using the specified bitmap encoder.

Declaration

cs-api-definition
public static void ExportToImage(FrameworkElement element, Stream stream, BitmapEncoder encoder)

Parameters

element

FrameworkElement

FrameworkElement to get image from.

stream

Stream

Stream to write image to.

encoder

BitmapEncoder

Bitmap encoder.

ExportToImage(FrameworkElement, Stream, double, double, BitmapEncoder)

Exports an image of the given element to stream using the specified bitmap encoder.

Declaration

cs-api-definition
public static void ExportToImage(FrameworkElement element, Stream stream, double dpiHorizontal, double dpiVertical, BitmapEncoder encoder)

Parameters

element

FrameworkElement

FrameworkElement to get image from.

stream

Stream

Stream to write image to.

dpiHorizontal

double

The horizontal dpi setting.

dpiVertical

double

The vertical dpi setting.

encoder

BitmapEncoder

Bitmap encoder.

ExportToImage(FrameworkElement, string, BitmapEncoder)

Exports an image of the given element to file using the specified bitmap encoder.

Declaration

cs-api-definition
public static void ExportToImage(FrameworkElement element, string fileName, BitmapEncoder encoder)

Parameters

element

FrameworkElement

FrameworkElement to get the image from.

fileName

string

Name of the file to write the image to.

encoder

BitmapEncoder

Bitmap encoder.

ExportToImage(FrameworkElement, string, double, double, BitmapEncoder)

Exports an image of the given element to file using the specified bitmap encoder.

Declaration

cs-api-definition
public static void ExportToImage(FrameworkElement element, string fileName, double dpiHorizontal, double dpiVertical, BitmapEncoder encoder)

Parameters

element

FrameworkElement

FrameworkElement to get the image from.

fileName

string

Name of the file to write the image to.

dpiHorizontal

double

The horizontal dpi setting.

dpiVertical

double

The vertical dpi setting.

encoder

BitmapEncoder

Bitmap encoder.

ExportToXpsImage(FrameworkElement, Stream)

Exports an image of the given element to the XPS file.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xps")]
public static void ExportToXpsImage(FrameworkElement element, Stream stream)

Parameters

element

FrameworkElement

FrameworkElement to get image from.

stream

Stream

Stream.

ExportToXpsImage(FrameworkElement, string)

Exports an image of the given element to the XPS file.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xps")]
public static void ExportToXpsImage(FrameworkElement element, string fileName)

Parameters

element

FrameworkElement

FrameworkElement to get image from.

fileName

string

Name of the XPS file.