New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public static class ExportExtensions

Inheritance: objectExportExtensions

Methods

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

C#
public static void ExportToExcelMLImage(FrameworkElement element, Stream stream)
Parameters:elementFrameworkElement

FrameworkElement to get image from.

streamStream

Stream.

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

C#
public static void ExportToExcelMLImage(FrameworkElement element, string fileName)
Parameters:elementFrameworkElement

FrameworkElement to get the image from.

fileNamestring

Name of the Excel file.

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

C#
public static void ExportToImage(FrameworkElement element, Stream stream, BitmapEncoder encoder)
Parameters:elementFrameworkElement

FrameworkElement to get image from.

streamStream

Stream to write image to.

encoderBitmapEncoder

Bitmap encoder.

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

C#
public static void ExportToImage(FrameworkElement element, Stream stream, double dpiHorizontal, double dpiVertical, BitmapEncoder encoder)
Parameters:elementFrameworkElement

FrameworkElement to get image from.

streamStream

Stream to write image to.

dpiHorizontaldouble

The horizontal dpi setting.

dpiVerticaldouble

The vertical dpi setting.

encoderBitmapEncoder

Bitmap encoder.

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

C#
public static void ExportToImage(FrameworkElement element, string fileName, BitmapEncoder encoder)
Parameters:elementFrameworkElement

FrameworkElement to get the image from.

fileNamestring

Name of the file to write the image to.

encoderBitmapEncoder

Bitmap encoder.

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

C#
public static void ExportToImage(FrameworkElement element, string fileName, double dpiHorizontal, double dpiVertical, BitmapEncoder encoder)
Parameters:elementFrameworkElement

FrameworkElement to get the image from.

fileNamestring

Name of the file to write the image to.

dpiHorizontaldouble

The horizontal dpi setting.

dpiVerticaldouble

The vertical dpi setting.

encoderBitmapEncoder

Bitmap encoder.

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

C#
public static void ExportToXpsImage(FrameworkElement element, Stream stream)
Parameters:elementFrameworkElement

FrameworkElement to get image from.

streamStream

Stream.

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

C#
public static void ExportToXpsImage(FrameworkElement element, string fileName)
Parameters:elementFrameworkElement

FrameworkElement to get image from.

fileNamestring

Name of the XPS file.