Gets or sets the image viewer used as the pan source.
public ImageViewer ImageViewer { get; set; }
public:
property ImageViewer^ ImageViewer
{
ImageViewer^ get()
void set(ImageViewer^ value)
}
The image viewer used as the pan source. Default value is null.
Set this value to the source image viewer instance for the pan. Refer to ImageViewerPanControl for more information.
When a new viewer is set to ImageViewer, this control will hook to the TransformChanged and RedirectRender events of the viewer to track when the user pans and to render the content of the viewer along with the pan rectangle to the external control.
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.
Notice that if you have multiple viewers in your application, then you can use any of them to be the source of the pan. Simple set the viewer into the ImageViewer property. Switch to any other viewer instance at any time. To stop panning, you can set ImageViewer to null.
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;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document