Version

DisplayPreviewStatus Property

Returns or sets whether a dialog will be displayed while the preview pages are being generated.
Syntax
'Declaration
 
Public Property DisplayPreviewStatus As Boolean
public bool DisplayPreviewStatus {get; set;}
Remarks

By default, when a print operation is running a status dialog is displayed. This dialog indicates the page that is being printed and also includes a button that can be used to end the operation. If you do not want to display this dialog, you must set the DisplayPreviewStatus property to false.

Example
This sample demonstrates how to configure several properties of the UltraPrintPreviewControl.

Public Sub New()

   InitializeComponent()
   
   ' Give the control a reference to a PrintDocument-derived object.
   Me.ultraPrintPreviewControl1.Document = Me.ultraSchedulePrintDocument1
   
   ' Turn off the AutoGeneratePreview feature.
   ' If you do this you will be responsible for telling the control 
   ' when to start the preview operation using the GeneratePreview method.
   ' Alternatively you can set the DisplayPreviewStatus to false and it will 
   ' run the print operation but not show a status dialog.
   Me.ultraPrintPreviewControl1.AutoGeneratePreview = False
   Me.ultraPrintPreviewControl1.DisplayPreviewStatus = False
   
   ' Only allow for up to three preview pages to be generated.
   Me.ultraPrintPreviewControl1.MaximumPreviewPages = 3
   
   ' If the resolved mouse action is not already DynamicZoom, make it so.
   If Me.ultraPrintPreviewControl1.MouseActionResolved <> Infragistics.Win.Printing.PreviewMouseAction.DynamicZoom Then
      Me.ultraPrintPreviewControl1.MouseAction = Infragistics.Win.Printing.PreviewMouseAction.DynamicZoom
   End If 

   ' Use anti-aliasing to ensure that the image is smooth and clear.
   Me.ultraPrintPreviewControl1.UseAntiAlias = True

End Sub
public Form1()
{
	InitializeComponent();

	// Give the control a reference to a PrintDocument-derived object.
	this.ultraPrintPreviewControl1.Document = this.ultraSchedulePrintDocument1;

	// Turn off the AutoGeneratePreview feature.
	// If you do this you will be responsible for telling the control 
	// when to start the preview operation using the GeneratePreview method.
	// Alternatively you can set the DisplayPreviewStatus to false and it will 
	// run the print operation but not show a status dialog.
	this.ultraPrintPreviewControl1.AutoGeneratePreview = false;
	this.ultraPrintPreviewControl1.DisplayPreviewStatus = false;

	// Only allow for up to three preview pages to be generated.
	this.ultraPrintPreviewControl1.MaximumPreviewPages = 3;

	// If the resolved mouse action is not already DynamicZoom, make it so.
	if( this.ultraPrintPreviewControl1.MouseActionResolved != Infragistics.Win.Printing.PreviewMouseAction.DynamicZoom )
		this.ultraPrintPreviewControl1.MouseAction = Infragistics.Win.Printing.PreviewMouseAction.DynamicZoom;

	// Use anti-aliasing to ensure that the image is smooth and clear.
	this.ultraPrintPreviewControl1.UseAntiAlias = true;
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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