Occurs when any of the items inside this ImageViewer changes
Object.defineProperty(ImageViewer.prototype,'itemChanged',
get: function(),
set: function(value)
)
function itemChanged.add(function(sender, e));
function itemChanged.remove(function(sender, e));
itemChanged: void;
This event occurs when any of the items inside this ImageViewer changes. The ImageViewerItemChangedEventArgs will contain the item that has been changed in ImageViewerItemChangedEventArgs.Item and the reason for the change in ImageViewerItemChangedEventArgs.Reason.
Change the value of the following properties or calling the methods programmatically or by the viewer will raise the ItemChanged event with the specified reason:
Property or Method | Value of ImageViewerItemChangedEventArgs.Reason |
---|---|
Image | ImageViewerItemChangedReason.Image (and optionally ImageViewerItemChangedReason.Resolution if the value of Resolution is also set. |
Canvas | ImageViewerItemChangedReason.Image (and optionally ImageViewerItemChangedReason.Resolution if the value of Resolution is also set. |
Url | ImageViewerItemChangedReason.Image (and optionally ImageViewerItemChangedReason.Resolution if the value of Resolution is also set. |
ImageSize | |
Size | |
Resolution | |
Floater | |
FloaterTransform | |
FloaterOpacity | |
Text | |
IsSelected | |
IsHovered | |
IsEnabled | |
IsVisible | |
Transform | |
Zoom | |
ResizeOnTransform | |
ClipImageToContent | |
ImageHorizontalAlignment | |
ImageVerticalAlignment | |
TextHorizontalAlignment | |
TextHorizontalAlignment |
The viewer automatically listens to these events internally and will perform the necessary action, for example, if any property that affect the transformation changes, UpdateTransform will be called. If the property change requires rendering only, then the item will be invalidated.
This example will track the ItemChanged and ItemError event and show information on them.
Run the demo, click the Example button.
Start with the ImageViewer example, remove all the code inside the example function (search for the "// TODO: add example code here" comment) and insert the following code:
this._imageViewer.itemChanged.add(function (sender, e) {
var item = e.item;
var sb = "ItemChanged: " + this._imageViewer.items.indexOf(item).toString() +
" Reason:" + e.reason.toString() +
" Size:" + item.size.toString() +
" Res:" + item.resolution.toString();
if (item.image != null)
sb += " Image: " + item.image.width.toString() + " by " + item.image.height.toString();
else
sb += " Image: null";
alert(sb);
if (item.url != null)
alert(" Url:" + item.url.toString());
});
Parameter | Type | Description |
---|---|---|
sender | var | The source of the event. |
e | ImageViewerItemChangedEventArgs | The event data. |
Products |
Support |
Feedback: itemChanged Event (ImageViewer) - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.3.21
|
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.