Base class for the rich user experience features of the ImageViewer.
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:
Cursor to use when the interactive mode is in an idle, working or hit-test state (for desktop browsers).
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.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries