Version

ViewBoxDisplayStyle Property

Returns or sets a value indicating where the view box will be displayed in the thumbnail pages.
Syntax
'Declaration
 
Public Property ViewBoxDisplayStyle As ViewBoxDisplayStyle
public ViewBoxDisplayStyle ViewBoxDisplayStyle {get; set;}
Remarks

The ViewBoxDisplayStyle determines which preview pages, if any, will include a viewbox element. The viewbox element indicates what portion of that page is currently displayed within the associated PreviewControl.

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