←Select platform

InteractiveService Class

Summary

Defines the service to translate mouse and tap events to common user interface interactions.

Syntax

C#
VB
Java
Objective-C
WinRT C#
public class InteractiveService  
Public Class InteractiveService  
public sealed class InteractiveService  
iOS: 
@interface LTInteractiveService : NSObject <LTBasicGestureRecognizerDelegate> 
macOS: 
@interface LTInteractiveService : NSObject 
              
public class InteractiveService 
function Leadtools.Controls.InteractiveService() 

Remarks

The InteractiveService object hooks to the target framework element TargetElement and starts listening to the events like tap, drag, hold, double tap and drag events.

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 InteractiveService Constructor(frameworkelement,frameworkelement) constructor. The events of the target framework element will be subscribed to and converted from raw mouse and tap to the common events mentioned above. All coordinates will be translated based on its position.

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 InteractiveService Constructor(FrameworkElement,FrameworkElement) constructor.

TargetElement

The target element.

StartListening, StopListening and IsListening

Subscribe/Unsubscribe to the events

Tap, DoubleTap, Hold, DragStarted, DragDelta and DragCompleted

Uniform events for common user interface interaction regardless of the event source (mouse or touch)

InteractiveService will subscribe to multiple Windows Runtime 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.

Requirements

Target Platforms

Help Version 19.0.2017.10.28
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly (WinRT / WPF / iOS / OS X / Android)