←Select platform

CanStartWork Method

Summary

Indicates whether the mode can start work.

Syntax

C#
VB
Java
Objective-C
WinRT C#
protected bool CanStartWork(  
   Leadtools.Controls.InteractiveEventArgs e 
) 
Protected Function CanStartWork( _ 
   ByVal e As Leadtools.Controls.InteractiveEventArgs _ 
) As Boolean 
protected bool CanStartWork(  
   Leadtools.Controls.InteractiveEventArgs e 
) 
iOS: 
- (BOOL)canStartWork:(UIGestureRecognizer *)gestureRecognizer 
macOS: 
- (BOOL)canStartWork:(LTBasicEvent *)event 
protected boolean canStartWork(MotionEvent event) 
 function Leadtools.Controls.ImageViewerInteractiveMode.CanStartWork(  
   e  
) 

Parameters

e
An InteractiveEventArgs that indicates if the mode can start work or not.

Remarks

The mode can start work depending on multiple factors:

  • Whether the current pressed mouse button is the one associated with this mode.

  • If the user clicks on the background of the viewer not covered by the image (depending on the WorkOnImageRectangle value).

To help with all the above, derived classes can use CanStartWork to check if all the conditions are met and then starts the work.

Note on mouse wheel events: If the current image viewer has a an interactive mode for handling mouse wheel events set in MouseWheelInteractiveMode then in addition to the factors listed above, this method will return true only if the caller is this mode. If the viewer however does not have a mode for handling mouse wheel events (MouseWheelInteractiveMode is null), then this method will return true if the caller is the default mouse or touch interactive mode.

Example

For an example, refer to ImageViewerInteractiveMode.

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)