←Select platform

ImageViewerPanControl Class

Summary

Supports displaying a scaled view of an ImageViewer into an external control with panning support.

Syntax
C#
C++/CLI
public class ImageViewerPanControl : IDisposable 
public ref class ImageViewerPanControl 
Remarks

The ImageViewerPanControl is used to display a scaled view of an image, which is also being displayed in the ImageViewer control on an external target control at a size that would require scrolling. ImageViewerPanControl will maintain the images aspect ratio. A colored pan rectangle will be displayed to indicate the portion of the image currently being displayed in the viewer associated with this pan control.

By default, when the user clicks inside the pan control and drags using the mouse or touch, the pan rectangle will move with it.

Example
C#
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
 
public void ImageViewerPanControl_Example() 
{ 
   PictureBox control = new PictureBox(); 
   control.Width = 400; 
   control.Dock = DockStyle.Left; 
   _control.Controls.Add(control); 
 
   control.BringToFront(); 
   _imageViewer.BringToFront(); 
 
   ImageViewerPanControl panControl = new ImageViewerPanControl(); 
   panControl.EnablePan = true; 
   panControl.BorderPen = Pens.Yellow; 
   //panControl.InsideBrush = new SolidBrush(Color.FromArgb(128, 0, 0, 0)); 
   panControl.OutsideBrush = new SolidBrush(Color.FromArgb(128, 0, 0, 0)); 
   panControl.WorkingCursor = Cursors.Hand; 
   panControl.Control = control; 
   panControl.MouseButton = MouseButtons.Left; 
 
   panControl.ImageViewer = _imageViewer; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.