LEADTOOLS WinRT(Leadtools.Controls)
LEAD Technologies, Inc

WorkingInteractiveMode Property

Example 

Gets the ImageViewerInteractiveMode that the viewer control is currently using to process input events. WinRT support
Syntax
public virtual ImageViewerInteractiveMode WorkingInteractiveMode {get;}
 get_WorkingInteractiveMode(); 

Property Value

The ImageViewerInteractiveMode that the viewer control is currently using to process input events.
Remarks

ImageViewer will hook to the ImageViewerInteractiveMode.WorkStarted and ImageViewerInteractiveMode.WorkCompleted of the interactive modes set in MouseWheelInteractiveMode or TouchInteractiveMode. When work starts or completes, the WorkingInteractiveModeChanged event fires and the value of WorkingInteractiveMode updates accordingly. You can use WorkingInteractiveMode to perform any custom action required by your application.

Example
Copy CodeCopy Code  
[TestMethod]
public void WorkingInteractiveModeExample()
{
   // Pan Zoom interactive mode is set in other parts of this demo
   // Hook to WorkingInteractiveMode of the _viewer
   _viewer.WorkingInteractiveModeChanged += _viewer_WorkingInteractiveModeChanged;
   string content;

   // This will be used by mouse and touch, so delcare it here once
   ImageViewerPanZoomInteractiveMode zoomPan = new ImageViewerPanZoomInteractiveMode();

   _viewer.TouchInteractiveMode = zoomPan;
   content = "Touch and drag to pan, pinch to zoom";

   _infoLabel.Text = content;
}

void _viewer_WorkingInteractiveModeChanged(object sender, EventArgs e)
{
   // Get the current working interactive mode
   ImageViewerInteractiveMode interactiveMode = _viewer.WorkingInteractiveMode;
   if (interactiveMode != null)
   {
      _infoLabel.Text = _infoLabel.Text + " - " + interactiveMode.Name + " is working";
   }
   else
   {
      _infoLabel.Text = _infoLabel.Text + " - finished working";
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ImageViewer Class
ImageViewer Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.