Assume imageViewer is the ID of a div in the HTML page. As an empty item (without any image data, just size information)įor the code snippets below, replace the code used in Using Image Viewer with the snippet below, then add the code described.From a URL containing raster or SVG image data.From raster image data in an HTML5 Canvas Element.From raster or SVG image data in an HTML Image Element.For more information, refer to Image Viewer Layouts.Ī new item can be added to the viewer using any of the following: The items are arranged for viewing using the layout system. In Elements Mode, the following methods are also available: Inserts an item at the specified index from an HTML5 Canvas Element Replaces or sets the image data of an item from a URL pointing to an image fileĪdds an item from an HTML5 Canvas Element Replaces or sets the HTML or SVG Element of an item Inserts an item at the specified index from a URL pointing to an SVG Element Inserts an item at the specified index from a URL pointing to an imageĪdds an item from a URL pointing to an SVG Element Inserts an item at the specified index from an HTML or SVG ElementĪdds an item from a URL pointing to an image Inserts an item at the specified index from an HTML Image Element Returns the currently selected items in the viewer In addition to the above standard collection operations, ImageViewerItems supports the following: Occurs when the number of values of selected items has changed Occurs when an error occurred while setting the item image data When an items list or the properties of an item has changed, the following events occur in the image viewer: Gets or sets an item at the specified indexĭetermines whether an item is in the viewer Removes the item at the specified index from the viewer Inserts a new item to the viewer at the specified index. Since it is an ImageViewerItems type, it implements standard ICollection and IList interfaces to easily add/remove/get/set and enumerate the items. Use the ImageViewer.Items property to access the image viewer items. Summary ImageViewer supports one or more items, each containing its own image data, size, and optional additional transformations.
0 Comments
Leave a Reply. |