←Select platform

Control Property

Summary

Target pan control.

Syntax
C#
C++/CLI
public Control Control { get; set; } 
public:  
   property System::Windows::Forms::Control^ Control 
   { 
      System::Windows::Forms::Control^ get() 
      void set(System::Windows::Forms::Control^ value) 
   } 

Property Value

The target pan control. Default value is null.

Remarks

Set this property to any control (must be an HTML5 Canvas Element in JavaScript) to act as the target of the pan control.

Once Control and ImageViewer are set, ImageViewerPanControl will render the content of the viewer into the target control along with a rectangle that shows the current visible area. If the value of EnablePan is set to true then clicking and dragging on the control surface will move the pan rectangle in the external control and pan the view in the image viewer accordingly.

Example
C#
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
 
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.ImageViewer = _imageViewer; 
Requirements

Target Platforms

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

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