Base class for the rich user experience features of the ImageViewer.
function lt.Controls.ImageViewerInteractiveMode
class lt.Controls.ImageViewerInteractiveMode()
ImageViewerInteractiveMode works with the InteractiveService object of the ImageViewer to provide rich user interface experiences when the user interacts with the viewer using mouse or touch.
ImageViewerInteractiveMode is a base abstract class: from it you can derive your own class to handle custom interaction with the viewer. For more information and for a list of the out-of-the-box modes provided by LEADTOOLS, refer to Image Viewer Interactive Modes.
ImageViewerInteractiveMode has the following functionality:
Member | Description |
---|---|
WorkingCursor, IdleCursor and HitTestStateCursor | Cursor to use when the interactive mode is in an idle, working or hit-test state (for desktop browsers). |
MouseButtons |
The mouse button attached to this mode (for desktop browsers) |
To use an interactive mode, you create an instance of any of the derived classes and assign it to the viewer using one of the following methods:
ImageViewer.DefaultInteractiveMode: Assigns the interactive mode to the left mouse button on desktop browsers or default touch events on devices that support touch.
ImageViewer.InteractiveModes: Add more than one interactive mode to the viewer.
Within the derived class, attach listeners to the events of InteractiveService to perform actions based on user input. Set InteractiveEventArgs.IsHandled to true to mark the events as handled so that other interactive modes will not also respond to the events, if desired.
You can use multiple interactive modes at the same time. For example, use the following code to support panning/zooming with the left mouse button and magnify glass with the right button:
For an example of creating a custom interactive mode, refer to the Introduction.
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