Version

ViewBoxAppearance Property

Returns or sets the appearance used to render the view box. The view box is the area within a page that indicates what portion of a page is currently in view in the associated preview control.
Syntax
'Declaration
 
Public Property ViewBoxAppearance As Infragistics.Win.AppearanceBase
public Infragistics.Win.AppearanceBase ViewBoxAppearance {get; set;}
Remarks

The viewbox is the area within the preview pages of the UltraPrintPreviewThumbnail that indicates the pages currently in view within the associated PreviewControl.

Currently the PreviewPageViewBoxUIElement.BorderStyle is Solid so the Infragistics.Win.AppearanceBase.BorderColor3DBase will not affect the appearance of the viewbox.

Example
This snippet shows how to customize the look and feel of the UltraPrintPreviewThumbnail.

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;
}
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