Xceed DataGrid for WPF v7.2 Documentation
ShowPrintPreviewPopup(String,Boolean,EventHandler<ProgressEventArgs>,Boolean,Size,Size) Method


Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > DataGridControl Class > ShowPrintPreviewPopup Method : ShowPrintPreviewPopup(String,Boolean,EventHandler<ProgressEventArgs>,Boolean,Size,Size) Method
A string representing the title that will be used as the print-job name.
true if the end user can specify the range of pages to print; false if all pages will be printed.
The callback that will handle the PrintProgression event.
true if the progress window is displayed; false otherwise.
A Size structure indicating the size of the popup.
A Size structure indicating the default size to be used if the application does not have default printing permissions (PrintingPermissionLevel.DefaultPrinting). This is usually the case with XBAP applications.

Displays a print preview dialog in a popup specifying the title that will be used as the print-job name, indicating whether the end user can specify the range of pages to print, and providing a callback that will handle the PrintProgression event, the size of the popup, and the default paper size, as well as indicating whether the progress window is displayed.

Syntax
'Declaration
 
Public Overloads Sub ShowPrintPreviewPopup( _
   ByVal documentTitle As String, _
   ByVal userPageRangeEnabled As Boolean, _
   ByVal progressCallback As EventHandler(Of ProgressEventArgs), _
   ByVal showProgressWindow As Boolean, _
   ByVal popupSize As Size, _
   ByVal fallbackPaperSize As Size _
) 
'Usage
 
Dim instance As DataGridControl
Dim documentTitle As String
Dim userPageRangeEnabled As Boolean
Dim progressCallback As EventHandler(Of ProgressEventArgs)
Dim showProgressWindow As Boolean
Dim popupSize As Size
Dim fallbackPaperSize As Size
 
instance.ShowPrintPreviewPopup(documentTitle, userPageRangeEnabled, progressCallback, showProgressWindow, popupSize, fallbackPaperSize)

Parameters

documentTitle
A string representing the title that will be used as the print-job name.
userPageRangeEnabled
true if the end user can specify the range of pages to print; false if all pages will be printed.
progressCallback
The callback that will handle the PrintProgression event.
showProgressWindow
true if the progress window is displayed; false otherwise.
popupSize
A Size structure indicating the size of the popup.
fallbackPaperSize
A Size structure indicating the default size to be used if the application does not have default printing permissions (PrintingPermissionLevel.DefaultPrinting). This is usually the case with XBAP applications.
Remarks

This method should be used when the application is being deployed as an XBAP, as XBAP applications cannot open new windows.

fallbackPaperSize will be used if the application does not have the default printing permissions (PrintingPermissionLevel.DefaultPrinting), which means that the printers cannot be accessed in order to query their paper size, etc. This is usually the case when in an application deployed as an XBAP, as by default it will be running in Partial Trust.

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