(Leadtools.Controls)

ImageViewerSpyGlassInteractiveMode Class

Show in webframe
Example 





Members 
Draws and pans a spy glass on top of the viewer.
Object Model
Syntax
public class ImageViewerSpyGlassInteractiveMode : ImageViewerInteractiveMode 
Public Class ImageViewerSpyGlassInteractiveMode 
   Inherits ImageViewerInteractiveMode
public sealed class ImageViewerSpyGlassInteractiveMode : ImageViewerInteractiveMode 
@interface LTImageViewerSpyGlassInteractiveMode:LTImageViewerInteractiveMode<NSCoding>
public class ImageViewerSpyGlassInteractiveMode extends ImageViewerInteractiveMode
function Leadtools.Controls.ImageViewerSpyGlassInteractiveMode()
Remarks

ImageViewerSpyGlassInteractiveMode derives from ImageViewerInteractiveMode and subscribes to the following events of the InteractiveService:

ImageViewerSpyGlassInteractiveMode works as follows:

  1. When InteractiveService.DragStarted is received, a temporary ractangle element is created on top of the viewer, this rectangle is used to draw the spy glass.

  2. When InteractiveService.DragDelta is received, the temporary rectangle is moved to the current position.

  3. When InteractiveService.DragCompleted is received, the temporary canvas is removed.

ImageViewerSpyGlassInteractiveMode interactive mode does not perform any action on the viewer (besides drawing, moving and then removing the spy glass). It is up to the user to implement any custom operation required. For example, to implement a magnify glass. ImageViewerMagnifyGlassInteractiveMode derives from ImageViewerSpyGlassInteractiveMode and overrides the OnDrawImage method to draw a magnified version of the area under the spy glass.

Example
Copy Code  
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;

[TestMethod]
public void ImageViewerSpyGlassInteractiveModeExample()
{
   // Set spy glass as the default interactive mode
   ImageViewerSpyGlassInteractiveMode spyglassMode = new ImageViewerSpyGlassInteractiveMode();
   // Customize it
   spyglassMode.BorderColor = new SolidColorBrush(Windows.UI.Color.FromArgb(255, 255, 0, 0));
   spyglassMode.BackgroundColor = new SolidColorBrush(Windows.UI.Color.FromArgb(255, 0, 0, 255));
   spyglassMode.BorderThickness = 2;
   spyglassMode.Shape = ImageViewerSpyGlassShape.RoundRectangle;
   spyglassMode.Crosshair = ImageViewerSpyGlassCrosshair.Fine;
   spyglassMode.Size = new Size(100, 100);

   _viewer.DefaultInteractiveMode = spyglassMode;
}
Requirements

Target Platforms

See Also

Reference

ImageViewerSpyGlassInteractiveMode Members
Leadtools.Controls Namespace

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.