Automatically pans the view when the mouse or touch is next to the edge.
public class ImageViewerAutoPanInteractiveMode : ImageViewerInteractiveMode
Public Class ImageViewerAutoPanInteractiveMode
Inherits ImageViewerInteractiveMode
public ref class ImageViewerAutoPanInteractiveMode : ImageViewerInteractiveMode
ImageViewerAutoPanInteractiveMode derives from ImageViewerInteractiveMode and subscribes to the following events of the InteractiveService:
ImageViewerAutoPanInteractiveMode works when the view boundary is larger than the current image viewer client area as follows:
When the mouse or touch is close to the edge of the viewer, and there are more room in that direction, then this mode will call ImageViewer.ScrollByRestrict to pan the view in that direction. How far the pointer is from the boundary to be consider "close" is determined by EdgeSize. The delay before auto-panning starts is controlled by BeginDelay.
If the user does not move the pointer, and PanDelay elapsed, then this mode will continue panning the viewer in that direction until it reaches the maximum value allowed by ScrollByRestrict.
ImageViewerAutoPanInteractiveMode can work with or without the user holding a mouse button down through the value of MouseButtons. It can also be combined with any other mode to allow auto-panning the viewer while the other mode is running. The example code shows how to use auto-pan with ImageViewerRubberBandInteractiveMode to allow drawing a rubber band and moving towards the edge of the viewer when the user reaches the edge. This is the auto-pan performing extra functionality to rubber-band. For more information, refer to Image Viewer Interactive Modes.
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using LeadtoolsExamples.Common;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
_imageViewer.InteractiveModes.BeginUpdate();
var autopan = new ImageViewerAutoPanInteractiveMode();
autopan.PanDelay = 100;
_imageViewer.InteractiveModes.Add(autopan);
_imageViewer.InteractiveModes.EndUpdate();
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color
_imageViewer.InteractiveModes.BeginUpdate()
Dim autopan As New ImageViewerAutoPanInteractiveMode()
autopan.PanDelay = 100
_imageViewer.InteractiveModes.Add(autopan)
_imageViewer.InteractiveModes.EndUpdate()
Products |
Support |
Feedback: ImageViewerAutoPanInteractiveMode 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.