ImageGear23.Windows.Forms Assembly > ImageGear.Windows.Forms Namespace : ImGearPan Class |
'Declaration Public Class ImGearPan Inherits System.ComponentModel.Component
'Usage Dim instance As ImGearPan
public class ImGearPan : System.ComponentModel.Component
public __gc class ImGearPan : public System.ComponentModel.Component
public ref class ImGearPan : public System.ComponentModel.Component
The common task for drawing an image in the ImGearPageView control is panning an image inside the window using mouse capturing. This class provides such functionality. This is not a Window or Control; this is a Component that extends the functionality of ImGearPageView with a panning algorithm. Assign the ImGearPageView control to the ImGearPan component to implement the panning functionality in page view. Use the SourceViewCursor property to change the dragging cursor in the source view of the ImGearPan component. Change the mouse button used for dragging with the PanButton property.
Optionally, a floating window can be used to display the complete image, scaled to fit within the floating window. By dragging the mouse within this floating window, the image in the ImGearPageView class control is repositioned. The portion of the image that is visible in the ImGearPageView class control is displayed within the floating window in reverse video. Assign the ImGearPageView control that will illustrate the place of the source view on the image to the DestinationView property of the ImGearPan component.
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
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
ImageGear.Windows.Forms.ImGearPan