Accusoft.ThumbnailXpress6.Net
InsertItemFromStream Method




The index position to add the given thumbnail.
The thumbnail to add.
This method inserts the provided ThumbnailItem into the collection at the given index. The display is updated if appropriate. Rather than obtaining its image data from a supplied filename/path, the image data will be expected to be provided by a System.IO.Stream object.
Syntax
'Declaration
 
Public Sub InsertItemFromStream( _
   ByVal collectionIndex As Integer, _
   ByVal item As ThumbnailItem _
) 
'Usage
 
Dim instance As ThumbnailItemCollection
Dim collectionIndex As Integer
Dim item As ThumbnailItem
 
instance.InsertItemFromStream(collectionIndex, item)
public void InsertItemFromStream( 
   int collectionIndex,
   ThumbnailItem item
)
public: void InsertItemFromStream( 
   int collectionIndex,
   ThumbnailItem* item
) 
public:
void InsertItemFromStream( 
   int collectionIndex,
   ThumbnailItem^ item
) 

Parameters

collectionIndex
The index position to add the given thumbnail.
item
The thumbnail to add.
Remarks

The Stream object may optionally be associated with the ThumbnailItem using its ThumbnailItem.FromStream method before InsertItemFromStream is called. However, a ThumbnailXpressEvents.LoadFromStreamEventHandlermust be supplied by the application and a stream object containing the image data must be supplied during processing of the event handler. Note that the event must be handled because at any time a stream-supplied thumbnail image can be scrolled out of the ThumbnailXpress image chache, and to redisplay, the component needs to re-obtain from the application the image data stream. Additionally, the ThumbnailItem passed to InsertItemFromStream must contain a valid ThumbnailItem.UserTag object that allows the application to identify the stream object that will provide the image data for the item.

This method does not wait for images to be generated before returning. The thumbnail images are generated in the background. This means a thumbnail's image data (for example, its bitmap) is likely not available immediately after this method returns. Use the ThumbnailXpress.ItemComplete event to determine when an item's image has completed being generated before attempting to programmatically access its image data

See Also

Reference

ThumbnailItemCollection Class
ThumbnailItemCollection Members

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback