Supports displaying a scaled view of an ImageViewer into an external control with panning support.
public class ImageViewerPanControl
Public Class ImageViewerPanControl
public ref class ImageViewerPanControl
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 along.
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using LeadtoolsExamples.Common;
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;
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color
Dim control As PictureBox = New PictureBox()
control.Width = 400
control.Dock = DockStyle.Left
_control.Controls.Add(control)
control.BringToFront()
_imageViewer.BringToFront()
Dim panControl As ImageViewerPanControl = 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
Products |
Support |
Feedback: ImageViewerPanControl Class - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.