Xceed DataGrid for WPF v7.2 Documentation
ExportToXps(String,Size,Rect,PageRange,CompressionOption,EventHandler<ProgressEventArgs>,Boolean) Method


Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > DataGridControl Class > ExportToXps Method : ExportToXps(String,Size,Rect,PageRange,CompressionOption,EventHandler<ProgressEventArgs>,Boolean) Method
A string representing the fully-qualified file name of the XPS document to which the grid will be exported. If the file exists, it will be overwritten.
A Size structure that indicates the size of the pages, including the printer margins.
A Rect structure that represents the area of the page that can be printed.
A PageRange structure that represents the range of pages to process.
A CompressionOption value that indicates the compression level to use.
The callback to invoke during the process.
true if the progress window is displayed; false otherwise.
Exports the grid to an XPS document that has the specified file name and using the provided page size, page range, imageable area, compression option, and providing the callback to invoke during the process, as well as indicating whether the progress window is displayed.
Syntax
'Declaration
 
Public Overloads Function ExportToXps( _
   ByVal fileName As String, _
   ByVal pageSize As Size, _
   ByVal imageableArea As Rect, _
   ByVal pageRange As PageRange, _
   ByVal compressionOption As CompressionOption, _
   ByVal progressCallback As EventHandler(Of ProgressEventArgs), _
   ByVal showProgressWindow As Boolean _
) As Boolean
'Usage
 
Dim instance As DataGridControl
Dim fileName As String
Dim pageSize As Size
Dim imageableArea As Rect
Dim pageRange As PageRange
Dim compressionOption As CompressionOption
Dim progressCallback As EventHandler(Of ProgressEventArgs)
Dim showProgressWindow As Boolean
Dim value As Boolean
 
value = instance.ExportToXps(fileName, pageSize, imageableArea, pageRange, compressionOption, progressCallback, showProgressWindow)

Parameters

fileName
A string representing the fully-qualified file name of the XPS document to which the grid will be exported. If the file exists, it will be overwritten.
pageSize
A Size structure that indicates the size of the pages, including the printer margins.
imageableArea
A Rect structure that represents the area of the page that can be printed.
pageRange
A PageRange structure that represents the range of pages to process.
compressionOption
A CompressionOption value that indicates the compression level to use.
progressCallback
The callback to invoke during the process.
showProgressWindow
true if the progress window is displayed; false otherwise.
Exceptions
ExceptionDescription
Can be thrown if access to the specified file is denied.
Can be thrown in XBAP if FullTrust permissions are not used.
Remarks
The appearance of a grid when it is printed or exported is determined by the PrintView property.
Requirements

Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataGridControl Class
DataGridControl Members
Overload List