Error processing SSI file
LEADTOOLS JavaScript (Leadtools.Controls)

Image Property (ImageViewerItem)

Show in webframe
Example 
HTML Image Element associated with this item.
Syntax
get_image();
set_image(value);
Object.defineProperty('image');

Property Value

TypeDescription
ImageElementThe HTML Image Element associated with this item. Default value is null.
Remarks

The item can have a value in only one of Image, Element or Canvas. Setting one value will automatically delete the values of the others. Element accepts any element, but may still be null after the set operation. An HTML Image Element set to Element will actually be set to Image, and an HTML5 Canvas Element set to Element will actually be set to Canvas.

Changing the value of this property will fire the ItemChanged event with ImageViewerItemChangedReason.Image. The value of Resolution will not be automatically updated with the DPI of the new image. The user must set this value manually.

If the value of AutoCreateCanvas is true, then setting this value will create a canvas and set it in Canvas and the property value will be discarded.

Image property of ImageViewer will update this member if this is the active item when the viewer is used in single item mode.

For more information, refer to Image Viewer Items.

Example
var img = new Image(200, 200);

var item = new lt.Controls.ImageViewerItem();
item.size = lt.LeadSizeD.create(img.width, img.height);
item.text = "Item # 1";
item.image = img;

this._imageViewer.beginUpdate();
this._imageViewer.items.add(item);
this._imageViewer.endUpdate();
See Also

Reference

ImageViewerItem Object
ImageViewerItem Members

Error processing SSI file