Item that caused the error.
public ImageViewerItem Item { get; } public:property ImageViewerItem^ Item{ImageViewerItem^ get()}
The item that caused the error. Could be null if the error was not associated with a specific item.
using Leadtools;using Leadtools.Controls;using Leadtools.Codecs;using Leadtools.Drawing;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Color;public ImageViewerForm _form = new ImageViewerForm();public ImageViewer _imageViewer;public void ImageViewerItemChangedExample(){// Get the Form's ImageViewer control_imageViewer = _form.ImageViewer;// ImageViewerItemChangedEventArgs reference_imageViewer.ItemChanged += (sender, e) =>{var item = e.Item;var sb = new StringBuilder();sb.AppendFormat("ItemChanged:{0} Reason:{1} Size:{2} Res:{3}", _imageViewer.Items.IndexOf(item), e.Reason, item.Size, item.Resolution);if (item.Image != null)sb.AppendFormat(" Image: {0} bpp {1} by {2}", item.Image.BitsPerPixel, item.Image.Width, item.Image.Height);elsesb.AppendFormat(" Image: null");Debug.WriteLine(sb.ToString());if (item.Url != null)Debug.WriteLine(" Url:" + item.Url.ToString());};// ImageViewerItemErrorEventArgs reference_imageViewer.ItemError += (sender, e) =>{e.RemoveEmptyItem = false;Debug.WriteLine("Data: {0}, Error: {1}", e.Data, e.Error);};// Load an imageusing (var codecs = new RasterCodecs())_imageViewer.Image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Ocr1.tif"));}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
