'Declaration Public Class UltraPrintPreviewThumbnail Inherits UltraPrintPreviewControlBase Implements Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.Touch.ISupportTouchMetrics, Infragistics.Win.UIAutomation.IProvideUIAutomation
public class UltraPrintPreviewThumbnail : UltraPrintPreviewControlBase, Infragistics.Win.AppStyling.ISupportAppStyling, Infragistics.Win.IUltraControl, Infragistics.Win.IUltraControlElement, Infragistics.Win.Touch.ISupportTouchMetrics, Infragistics.Win.UIAutomation.IProvideUIAutomation
The UltraPrintPreviewThumbnail is a derived UltraPrintPreviewControlBase control that is specialized for interacting with an associated UltraPrintPreviewControl. The PreviewControl is used to indicate which UltraPrintPreviewControl will provide the preview pages. Clicking on pages within UltraPrintPreviewThumbnail will cause the associated page within the PreviewControl to be scrolled into view.
The control includes the capability to display a "viewbox" within its preview pages. This viewbox indicates which portions of the pages within the associated PreviewControl are currently in view. The ViewBoxDisplayStyle is used to indicate which pages should display the viewbox. The ViewBoxAppearance may be used to control the appearance of the viewbox displayed within the pages. In addition, the ViewBoxDragMode may be used to control how the view box may be dragged. Dragging the viewbox updates the pages displayed within the PreviewControl. It is also possible to affect the pages displayed by the PreviewControl by clicking on a page in the preview or by clicking on the page number (PageNumberDisplayStyle).
Private Sub PrintPreviewForm_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load ' Set the PreviewControl property to the UltraPrintPreviewControl on the Form. ' Me.ultraPrintPreviewThumbnail1.PreviewControl = Me.ultraPrintPreviewControl1 ' Give a gradient to the background of the thumbnail page image. ' Me.ultraPrintPreviewThumbnail1.CurrentPreviewPageAppearance.BackColor = Color.LightGreen Me.ultraPrintPreviewThumbnail1.CurrentPreviewPageAppearance.BackColor2 = Color.Green Me.ultraPrintPreviewThumbnail1.CurrentPreviewPageAppearance.BackGradientStyle = Infragistics.Win.GradientStyle.ForwardDiagonal ' Customize the area in the thumbnail which displays the current page number. ' Me.ultraPrintPreviewThumbnail1.CurrentPreviewPageNumberAppearance.ForeColor = Color.Red Me.ultraPrintPreviewThumbnail1.CurrentPreviewPageNumberAppearance.FontData.SizeInPoints = 12 Me.ultraPrintPreviewThumbnail1.CurrentPreviewPageNumberAppearance.BackColor = Color.SeaGreen ' Give the viewbox a semi-transparent "film" of aquamarine. ' Me.ultraPrintPreviewThumbnail1.ViewBoxAppearance.BackColor = Color.Aquamarine Me.ultraPrintPreviewThumbnail1.ViewBoxAppearance.AlphaLevel = 100 ' Prevent the view box from appearing in any page that is not the current page. ' Me.ultraPrintPreviewThumbnail1.ViewBoxDisplayStyle = Infragistics.Win.Printing.ViewBoxDisplayStyle.CurrentPreviewPage ' If the resolved value for ViewBoxDragMode is not 'RestrictWithinPage', make it so. ' If Me.ultraPrintPreviewThumbnail1.ViewBoxDragModeResolved <> Infragistics.Win.Printing.ViewBoxDragMode.RestrictWithinPage Then Me.ultraPrintPreviewThumbnail1.ViewBoxDragMode = Infragistics.Win.Printing.ViewBoxDragMode.RestrictWithinPage End If End Sub
private void PrintPreviewForm_Load(object sender, System.EventArgs e) { // Set the PreviewControl property to the UltraPrintPreviewControl on the Form. // this.ultraPrintPreviewThumbnail1.PreviewControl = this.ultraPrintPreviewControl1; // Give a gradient to the background of the thumbnail page image. // this.ultraPrintPreviewThumbnail1.CurrentPreviewPageAppearance.BackColor = Color.LightGreen; this.ultraPrintPreviewThumbnail1.CurrentPreviewPageAppearance.BackColor2 = Color.Green; this.ultraPrintPreviewThumbnail1.CurrentPreviewPageAppearance.BackGradientStyle = Infragistics.Win.GradientStyle.ForwardDiagonal; // Customize the area in the thumbnail which displays the current page number. // this.ultraPrintPreviewThumbnail1.CurrentPreviewPageNumberAppearance.ForeColor = Color.Red; this.ultraPrintPreviewThumbnail1.CurrentPreviewPageNumberAppearance.FontData.SizeInPoints = 12; this.ultraPrintPreviewThumbnail1.CurrentPreviewPageNumberAppearance.BackColor = Color.SeaGreen; // Give the viewbox a semi-transparent "film" of aquamarine. // this.ultraPrintPreviewThumbnail1.ViewBoxAppearance.BackColor = Color.Aquamarine; this.ultraPrintPreviewThumbnail1.ViewBoxAppearance.AlphaLevel = 100; // Prevent the view box from appearing in any page that is not the current page. // this.ultraPrintPreviewThumbnail1.ViewBoxDisplayStyle = Infragistics.Win.Printing.ViewBoxDisplayStyle.CurrentPreviewPage; // If the resolved value for ViewBoxDragMode is not 'RestrictWithinPage', make it so. // if( this.ultraPrintPreviewThumbnail1.ViewBoxDragModeResolved != Infragistics.Win.Printing.ViewBoxDragMode.RestrictWithinPage ) this.ultraPrintPreviewThumbnail1.ViewBoxDragMode = Infragistics.Win.Printing.ViewBoxDragMode.RestrictWithinPage; }
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