(Leadtools.Controls)

WorkOnImageRectangle Property

Show in webframe
Example 





Gets or sets a value that indicates whether to restrict the work area to the image rectangle.
Syntax
public bool WorkOnImageRectangle {get; set;}
Public Property WorkOnImageRectangle As Boolean
public bool WorkOnImageRectangle {get; set;}
@property (nonatomic) BOOL workOnImageRectangle;
public boolean getWorkOnImageRectangle()
public void setWorkOnImageRectangle(boolean workOnImageRect)
            
 
get_WorkOnImageRectangle();
set_WorkOnImageRectangle(value);
Object.defineProperty('WorkOnImageRectangle');

Property Value

true to restrict the work area to the image rectangle; otherwise, it is false. The default value is true.
Remarks

If the current image size and scale in the viewer exposes part of the background, then clicking or touching on the background area not covered by the image may or may not start the work of this mode depending on this property.

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

[TestMethod]
public void WorkOnImageRectangleExample()
{
   // Set the interactive mode to magnify glass
   ImageViewerMagnifyGlassInteractiveMode magGlassMode = new ImageViewerMagnifyGlassInteractiveMode();
   _viewer.DefaultInteractiveMode = magGlassMode;
   // Flip the value of WorkOnImageRectangle of the default interactive mode
   ImageViewerInteractiveMode interactiveMode = _viewer.DefaultInteractiveMode;
   if (interactiveMode != null)
   {
      if (interactiveMode.WorkOnImageRectangle)
      {
         interactiveMode.WorkOnImageRectangle = false;
         _infoLabel.Text = "WorkOnImageRectangle will be set to false, now when you click on the background not covered by the image, it will work";
      }
      else
      {
         interactiveMode.WorkOnImageRectangle = true;
         _infoLabel.Text = "WorkOnImageRectangle will be set to true, now when you click on the background not covered by the image, it will not work";
      }
   }
}
Requirements

Target Platforms

See Also

Reference

ImageViewerInteractiveMode Class
ImageViewerInteractiveMode Members

 

 


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