Defines the service to translate mouse and touch events to common user interface interactions.
function lt.Controls.InteractiveService
implements IDisposable
class lt.Controls.InteractiveService()
implements IDisposable
The InteractiveService object hooks to any element 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.
(A separate functionality, User-Defined HTML Display, allows for native pointer events on HTML or SVG Elements that have been added to Element in Elements Mode when HTML Pointer Events is supported.)
ImageViewer contains an instance of InteractiveService internally (accessible through the ImageViewer.InteractiveService property) and use it along with the ImageViewerInteractiveMode 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 an HTML element that will act
as the events source (EventsSource). The events of this element will be subscribed to and converted from raw mouse and touch to the
common events mentioned above. Also, the Create
method takes another HTML element that will act as the events target
(EventsTarget). This element 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 element (ImageViewer.MainDiv)
will act as the events source and the foreground element (ImageViewer.ForeCanvas) will act as the events target.
This insures that all events inside the viewer surface will act upon and be translated into the foreground element coordinates.
InteractiveService contains the following members:
Members | Description |
---|---|
Owner |
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 this for this parameter in the Create method.
|
EventsSource | The events source element. |
EventsTarget | The events target element. |
UserControls | Any extra elements that should participate in the events handling. |
HitTestBuffer, PreventContextMenu, TapOnDown, DragStartsOnDown, PinchStartsOnDown, EnableMouseWheel and EnableSelection | Options used to modify the operations of the service. |
StartListening, StopListening and IsListening | 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) |
KeyDown and KeyUp. | Keyboard events |
InteractiveService will subscribe to multiple native events. It is recommended if you create an instance of this object to call Dispose on it when you are done to free the resources used. ImageViewer will dispose its instance of InteractiveService when ImageViewer.Dispose is called.
Products |
Support |
Feedback: InteractiveService Object - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.3.21
|
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.