This is the GUI Pan Control that allows the visible portion of an image displayed in the
ImGearPageView class control to be moved by dragging the mouse around in the image.
This example illustrates how the ImGearPan component can be bound with two
ImGearPageView controls to implemen the panning functionality. Created with the MainForm constructor of the application, the ImGearPan object is initialized with existing igPanSource and igPanDestination controls to achieve the required functionality. Since ImGearPan is a Component, working with ImGearPan is accessible from the Microsoft NET Windows Forms Designer.
using ImageGear.Core;
using ImageGear.Windows.Forms;
public partial class MainForm : Form
{
// Panning implementation object.
private ImGearPan igPan;
// Creates the new application form.
public MainForm()
{
InitializeComponent();
// Create panning implementation object.
igPan = new ImGearPan();
// Assign source window for panning.
igPan.SourceView = igPanSource;
// Assign the navigation control.
igPan.DestinationView = igPanDestination;
}
}
Imports ImageGear.Core
Imports ImageGear.Windows.Forms
Public Partial Class MainForm
Inherits Form
' Panning implementation object.
Private igPan As ImGearPan
' Creates the new application form.
Public Sub New()
InitializeComponent()
' Create panning implementation object.
igPan = New ImGearPan()
' Assign source window for panning.
igPan.SourceView = igPanSource
' Assign the navigation control.
igPan.DestinationView = igPanDestination
End Sub
End Class