Version

MouseAction Property

Returns or sets how the control will react to the left mouse button.
Syntax
'Declaration
 
Public Property MouseAction As PreviewMouseAction
public PreviewMouseAction MouseAction {get; set;}
Remarks

The MouseAction is used to determine how the control will react while it has the input focus. When used with a value of Hand, the left mouse button may be pressed on a page and dragged to scroll the visible area. A value of Snapshot is used to allow the end-user to click on or lasso an area of a page that should be copied to the clipboard. The area is copied using the current zoom value.

The MouseAction also includes several options for controlling the current Zoom using the mouse. When DynamicZoom is used, the mouse may be pressed and dragged up or down to synchronously zoom in or out respectively. When ZoomIn is used, the end-user can either click on a page to zoom in at a set increment or they may lasso the area that they want to zoom into. Lastly, when ZoomOut is used, the end-user can either click on a page to zoom out to a fixed increment or they may lasso an area that is used to determine the new zoom level.

Example
This sample demonstrates how to configure several properties of the UltraPrintPreviewControl.

Public Sub New()

   InitializeComponent()
   
   ' Give the control a reference to a PrintDocument-derived object.
   Me.ultraPrintPreviewControl1.Document = Me.ultraSchedulePrintDocument1
   
   ' Turn off the AutoGeneratePreview feature.
   ' If you do this you will be responsible for telling the control 
   ' when to start the preview operation using the GeneratePreview method.
   ' Alternatively you can set the DisplayPreviewStatus to false and it will 
   ' run the print operation but not show a status dialog.
   Me.ultraPrintPreviewControl1.AutoGeneratePreview = False
   Me.ultraPrintPreviewControl1.DisplayPreviewStatus = False
   
   ' Only allow for up to three preview pages to be generated.
   Me.ultraPrintPreviewControl1.MaximumPreviewPages = 3
   
   ' If the resolved mouse action is not already DynamicZoom, make it so.
   If Me.ultraPrintPreviewControl1.MouseActionResolved <> Infragistics.Win.Printing.PreviewMouseAction.DynamicZoom Then
      Me.ultraPrintPreviewControl1.MouseAction = Infragistics.Win.Printing.PreviewMouseAction.DynamicZoom
   End If 

   ' Use anti-aliasing to ensure that the image is smooth and clear.
   Me.ultraPrintPreviewControl1.UseAntiAlias = True

End Sub
public Form1()
{
	InitializeComponent();

	// Give the control a reference to a PrintDocument-derived object.
	this.ultraPrintPreviewControl1.Document = this.ultraSchedulePrintDocument1;

	// Turn off the AutoGeneratePreview feature.
	// If you do this you will be responsible for telling the control 
	// when to start the preview operation using the GeneratePreview method.
	// Alternatively you can set the DisplayPreviewStatus to false and it will 
	// run the print operation but not show a status dialog.
	this.ultraPrintPreviewControl1.AutoGeneratePreview = false;
	this.ultraPrintPreviewControl1.DisplayPreviewStatus = false;

	// Only allow for up to three preview pages to be generated.
	this.ultraPrintPreviewControl1.MaximumPreviewPages = 3;

	// If the resolved mouse action is not already DynamicZoom, make it so.
	if( this.ultraPrintPreviewControl1.MouseActionResolved != Infragistics.Win.Printing.PreviewMouseAction.DynamicZoom )
		this.ultraPrintPreviewControl1.MouseAction = Infragistics.Win.Printing.PreviewMouseAction.DynamicZoom;

	// Use anti-aliasing to ensure that the image is smooth and clear.
	this.ultraPrintPreviewControl1.UseAntiAlias = true;
}
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