This is a read-only property that returns an integer value indicating the number of preview pages that will be displayed by the control.
Private Sub ultraPrintPreviewControl1_PreviewGenerated(sender As Object, e As System.EventArgs) Handles Me.ultraPrintPreviewControl1.PreviewGenerated ' Get the number of pages in the preview as a string. Dim pageCount As String = Me.ultraPrintPreviewControl1.PageCount.ToString() ' Change the form's Text to display that number in a formatted string. Me.Text = [String].Format("Print Preview [{0} pages]", pageCount) End Sub
private void ultraPrintPreviewControl1_PreviewGenerated(object sender, System.EventArgs e) { // Get the number of pages in the preview as a string. string pageCount = this.ultraPrintPreviewControl1.PageCount.ToString(); // Change the form's Text to display that number in a formatted string. this.Text = String.Format( "Print Preview [{0} pages]", pageCount ); }
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