ImageViewerAutoPanInteractiveMode Class (original) (raw)

Summary

Automatically pans the view when the mouse or touch is next to the edge.

Remarks

ImageViewerAutoPanInteractiveMode derives from ImageViewerInteractiveMode and subscribes to the following events of theInteractiveService:

ImageViewerAutoPanInteractiveMode works when the view boundary is larger than the current image viewer client area as follows:

ImageViewerAutoPanInteractiveMode can work with or without the user holding a mouse button down through the value ofMouseButtons. It can also be combined with any other mode to allow auto-panning the viewer while the other mode is running because it: * Does not set InteractiveEventArgs.IsHandled to true when working

The example code shows how to use auto-pan with ImageViewerRubberBandInteractiveMode to allow drawing a rubber band, moving towards the edge of the viewer when the user reaches the edge. This is the auto-pan adding extra functionality to rubber-band.

For more information, refer to Image Viewer Interactive Modes.

Example

using Leadtools; using Leadtools.Controls; using Leadtools.Codecs; using Leadtools.Drawing; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Color; _imageViewer.InteractiveModes.BeginUpdate(); var autopan = new ImageViewerAutoPanInteractiveMode(); autopan.PanDelay = 100; _imageViewer.InteractiveModes.Add(autopan); _imageViewer.InteractiveModes.EndUpdate();