Version

InvalidatePreview Method

Used to dirty the preview information so that it will be regenerated upon the next request.
Syntax
'Declaration
 
Public Sub InvalidatePreview() 
public void InvalidatePreview()
Remarks

This method is used to explicitly dirty the cached preview information. When the preview information is subsequently requested, the preview pages will be generated.

Example
This snippet demonstrates how to invalidate the print preview. It assumes that the UltraPrintPreviewControl's Document refers to ultraSchedulePrintDocument1.

Private Sub button1_Click(sender As Object, e As System.EventArgs) Handles Me.button1.Click

   ' Increment the end date, which means that the print preview needs to be regenerated. 
   '
   Me.ultraSchedulePrintDocument1.EndDate = Me.ultraSchedulePrintDocument1.EndDate.AddDays(1)
   
   ' Invalidate the preview so that it will be drawn again.
   '
   Me.ultraPrintPreviewControl1.InvalidatePreview()

End Sub
private void button1_Click(object sender, System.EventArgs e)
{
	// Increment the end date, which means that the print preview needs to be regenerated. 
	//
	this.ultraSchedulePrintDocument1.EndDate = this.ultraSchedulePrintDocument1.EndDate.AddDays( 1 );

	// Invalidate the preview so that it will be drawn again.
	//
	this.ultraPrintPreviewControl1.InvalidatePreview();
}
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