Version

Adding PrintDialog Button Tool

This topic introduces the ability for users to optionally display a PrintDialog button tool to choose a printer or change other printer settings.

Required background

PrintDialog Button Tool

The PrintDialog Button Tool allows you to modify printer settings including but not limited to choosing a printer, select the amount of copies per page, and setting a page range.

The following screenshot is a preview of the PrintDialog Button Tool with a mouse hover revealing its tooltip.

PrintPreviewDialogButton 01.png

Property and Events

Property summary

The PrintDialogButtonVisible property shows or hides the PrintDialog Button Tool on the toolbar of the WinPrintPreviewDialog.

Property Name Property Type Description

Boolean

Returns or sets whether the PrintDialog Button Tool is visible.

Events summary

The following events have been added to the UltraPrintPreviewDialog class.

Event Event Description

This event occurs before the print dialog appears in order to override settings by using the PrintDialog property of the EventArgs argument. You can prevent the PrintDialog from appearing by setting the Cancel property of the EventArgs argument to True .

This event occurs in response to a clicking on the close or cancel button on the PrintDialog.

Enable the PrintDialog Button Tool

PrintPreviewDialogButton 02.png

An example of enabling the PrintDialog Button in code behind.

In C#:*

ultraPrintPreviewDialog1.PrintDialogButtonVisible = true;

In Visual Basic:*

ultraPrintPreviewDialog1.PrintDialogButtonVisible = true

Related Content

  • Using WinPrintPreviewDialog — In this section, you’ll find tutorials that walk you through common scenarios when using the WinPrintPreviewDialog™ component.