Print Preview Dialog
By using RadPrintPreviewDialog you can preview how the RadPrintDocument will appear when printed.
Show RadPrintPreviewDialog
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog();
dialog.Document = this.radPrintDocument1;
dialog.ShowDialog();
Dim dialog As New RadPrintPreviewDialog
dialog.Document = Me.RadPrintDocument1
dialog.ShowDialog()
You can also pass the RadPrintDocument to the RadPrintPreviewDialog via its constructor:
RadPrintPreviewDialog printPreviewDialog = new RadPrintPreviewDialog(this.radPrintDocument1);
printPreviewDialog.ShowDialog();
Dim printPreviewDialog As New RadPrintPreviewDialog(Me.RadPrintDocument1)
printPreviewDialog.ShowDialog()
The User Interface of RadPrintPreviewDialog is built on top of RadMenu and RadCommandBar. By default the menu is hidden and the command bar is enabled. You can access and customize both controls from the ToolMenu and ToolCommandBar properties. Here is a sample demonstrating how to show the menu and hide the command bar:
dialog.ToolMenu.Visible = true;
dialog.ToolCommandBar.Visible = false;
dialog.ToolMenu.Visible = True
dialog.ToolCommandBar.Visible = False
RadPrintPreviewDialog allows zooming and navigating through the pages via the menu and the tool strips. In addition, the end user can use mouse drag to scroll through the current view and Ctrl + Mouse Wheel to zoom in or out.
The RadPrintPreviewDialog can also be used for editing the print document. When the Print Settings button is clicked, RadPrintSettingsDialog is opened, allowing the end user to edit a variety of settings related to the printed object. Also, when the Watermark button is clicked, the end user can place a watermark on some of the pages by using the WatermarkSettingsDialog.
RadPrintPreviewDialog is also used at design time to edit and serialize the properties of RadPrintDocument. For more information refer to theRadPrintDocument article.