ClassExportExtensions
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:
public static class ExportExtensions
Inheritance: objectExportExtensions
Methods
ExportToExcelMLImage(FrameworkElement, Stream)
Exports an image of the given element to the Excel file.
Declaration
public static void ExportToExcelMLImage(FrameworkElement element, Stream stream)
Parameters
element
FrameworkElement
FrameworkElement to get image from.
stream
Stream.
ExportToExcelMLImage(FrameworkElement, string)
Exports an image of the given element to the Excel file.
Declaration
public static void ExportToExcelMLImage(FrameworkElement element, string fileName)
Parameters
element
FrameworkElement
FrameworkElement to get the image from.
fileName
Name of the Excel file.
ExportToImage(FrameworkElement, Stream, BitmapEncoder)
Exports an image of the given element to stream using the specified bitmap encoder.
Declaration
public static void ExportToImage(FrameworkElement element, Stream stream, BitmapEncoder encoder)
Parameters
element
FrameworkElement
FrameworkElement to get image from.
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
public static void ExportToImage(FrameworkElement element, Stream stream, double dpiHorizontal, double dpiVertical, BitmapEncoder encoder)
Parameters
element
FrameworkElement
FrameworkElement to get image from.
stream
Stream to write image to.
dpiHorizontal
The horizontal dpi setting.
dpiVertical
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
public static void ExportToImage(FrameworkElement element, string fileName, BitmapEncoder encoder)
Parameters
element
FrameworkElement
FrameworkElement to get the image from.
fileName
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
public static void ExportToImage(FrameworkElement element, string fileName, double dpiHorizontal, double dpiVertical, BitmapEncoder encoder)
Parameters
element
FrameworkElement
FrameworkElement to get the image from.
fileName
Name of the file to write the image to.
dpiHorizontal
The horizontal dpi setting.
dpiVertical
The vertical dpi setting.
encoder
BitmapEncoder
Bitmap encoder.
ExportToXpsImage(FrameworkElement, Stream)
Exports an image of the given element to the XPS file.
Declaration
[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.
ExportToXpsImage(FrameworkElement, string)
Exports an image of the given element to the XPS file.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Xps")]
public static void ExportToXpsImage(FrameworkElement element, string fileName)
Parameters
element
FrameworkElement
FrameworkElement to get image from.
fileName
Name of the XPS file.