Represents a scrollable control that displays a LEADTOOLS Leadtools.RasterImage with optional interactive UI operations.
public class RasterImageViewer : Leadtools.Controls.ImageViewer
Public Class RasterImageViewer
Inherits Leadtools.Controls.ImageViewer
public sealed class RasterImageViewer : Leadtools.Controls.ImageViewer
public class RasterImageViewer extends ImageViewer
function Leadtools.Controls.RasterImageViewer()
To use the RasterImageViewer class in your Windows Runtime application please see Using LEADTOOLS Viewer Controls in Visual Studio for WinRT (Windows Store)
The RasterImageViewer class derives from ImageViewer and adds functionality to display a LEADTOOLS Leadtools.RasterImage object in Windows Runtime applications. To display an ImageSource or one of its derived classes, use the ImageViewer control.
In addition to all the features supported by the ImageViewer class, RasterImageViewer adds the following:
Viewing a LEADTOOLS Leadtools.RasterImage object in Windows Runtime applications using the Image property.
In Windows Runtime, an image that is displayed must be an ImageSource or one of its derived classes, the RasterImageViewer control keeps the ImageViewer.Source property synchronized with RasterImageViewer.Image, any changes that occur to the LEADTOOLS Leadtools.RasterImage is reflected in the Source property. This control will subscribe to the RasterImage.Changed to monitor any changes that may occur to the image (through image processing for example) and reflect these changes to the Source property.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
public async Task RasterImageViewerExample()
{
Uri imageUrl = new Uri("ms-appx:///Assets/PngImage2.png");
// Zoom current image by a 2
_viewer.Zoom(ImageViewerSizeMode.None, 2, _viewer.ImageControlCenter);
// Scroll by 100 and 200 pixels
_viewer.ScrollBy(new Point(100, 200));
// Tell the _viewer to not change the scale factor and scroll position when a new image is set
// The easiest way is to get all options then remove the ones you do not want to change
ImageViewerNewImageResetOptions resetOptions = ImageViewerNewImageResetOptions.All;
resetOptions &= ~(ImageViewerNewImageResetOptions.ScaleFactor | ImageViewerNewImageResetOptions.ScrollOffset);
_viewer.NewImageResetOptions = resetOptions;
using (RasterCodecs codecs = new RasterCodecs())
{
StorageFile imageFile = await StorageFile.GetFileFromApplicationUriAsync(imageUrl);
_viewer.Image = await codecs.LoadAsync(LeadStreamFactory.Create(imageFile));
}
}
Products |
Support |
Feedback: RasterImageViewer Class - OLeadtools.Controls |
Introduction |
Help Version 19.0.2017.3.23
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.