←Select platform

ImageViewer Class

Summary

Represents a scrollable control that displays an image with optional interactive UI operations.

Syntax

C#
VB
Java
Objective-C
WinRT C#
public class ImageViewer : Leadtools.Control  
Public Class ImageViewer  
   Inherits Leadtools.Control 
public sealed class ImageViewer : Leadtools.Control  
iOS: 
@interface LTImageViewer : UIView <NSCoding> 
macOS: 
@interface LTImageViewer : NSView <NSCoding> 
public class ImageViewer extends ViewGroup 
function Leadtools.Controls.ImageViewer() 

Remarks

Usage

To use the ImageViewer class in your Windows Runtime application please see Using LEADTOOLS Viewer Controls in Visual Studio for WinRT (Windows Store)

Features

ImageViewer supports the following functionality:

  • Custom viewing of any canvas or image element.
  • Rich interactive user interface for zooming, panning, scrolling, magnify glass with support for mouse and touch. For more information, refer to DefaultInteractiveMode.
  • Automatic horizontal and vertical scroll and pan through the ScrollMode property.
  • Determining how the control displays the image and automatic adjustment for viewing when the control size changes using the SizeMode, ImageHorizontalAlignment and ImageVerticalAlignment properties.
  • Changing the zoom value used to display the image using the Zoom method.
  • Manual adjustment of extra horizontal and vertical stretching values using the AspectRatioCorrection property.
  • Support for viewing an image using its actual resolution through the UseDpi property.
  • Image viewing transformation using the Flip, Reverse and RotateAngle properties.
  • Converting a point or a rectangle between image (logical) and control (display or physical) coordinates using the ConvertPoint and ConvertRect methods.
Example

WinRT C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Controls; 
 
public async Task<ImageViewer> ImageViewerExample() 
{ 
   ImageViewer imageViewer = new ImageViewer(); 
   Uri imageUrl = new Uri("ms-appx:///Assets/PngImage2.png"); 
   // Set the interactive mode to PanZoom 
   var interactiveMode = new Leadtools.Controls.ImageViewerPanZoomInteractiveMode(); 
   imageViewer.DefaultInteractiveMode = interactiveMode; 
 
 
   // Set the image Source 
   imageViewer.Source = new BitmapImage(imageUrl); 
} 

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)