Defines the service to translate mouse and touch events to common user interface interactions.
public class InteractiveService : IDisposable
@interface LTInteractiveService : NSObject
public ref class InteractiveService
The InteractiveService object hooks to any control events and can be used to provide uniform tap, move, drag, hold, double tap, drag and pinch events. This can be done regardless of whether the platform supports mouse or touch events.
ImageViewer contains an instance of InteractiveService internally (accessible through the InteractiveService classes to perform rich interactive user interface interactions such as zoom, pan, scale, rubber banding and magnify glass.
To use the InteractiveService, call the Create method passing a control that will act as the events source (EventsSource). The events of this control will be subscribed to and converted from raw mouse and touch to the common events mentioned above. Also, the Create method takes another control that will act as the events target ( EventsTarget). This control is the target that will be used to check if the event is triggered on its surface. All coordinates will be translated based on its position. In the case of ImageViewer, the main control (the viewer control itself) will act as the events source and the foreground control (also the viewer control itself) will act as the events target. This insures that all events inside the viewer surface will act upon and translated into the control coordinates.
InteractiveService contains the following members:
Members | Description |
---|---|
The owner of the service. This is not used by InteractiveService but can be used by the application to pass any class
and extra data. ImageViewer passes |
|
The events source control. |
|
The events target control. |
|
Any extra controls that should participate in the events handling. |
|
HitTestBuffer, TapOnDown, DragStartsOnDown, PinchStartsOnDown and EnableMouseWheel |
Options used to modify the operations of the service. |
Subscribe/Unsubscribe to the events |
|
Tap, DoubleTap, Move, Hold, DragStarted, DragDelta, DragCompleted, PinchStarted, PinchDelta and PinchCompleted |
Uniform events for common user interface interaction regardless of the event source (mouse or touch) |
Keyboard events |
Note that pinch events are not supported in the Windows Forms platform.
InteractiveService will subscribe to multiple native events. It is recommended if you create an instance of this object to call System.IDisposable.Dispose on it when you are done to free the resources used. ImageViewer will dispose its instance of InteractiveService when ImageViewer.Dispose is called.
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