A thumbnail can be removed from the ThumbnailItemCollection by calling Remove, RemoveAt, or Clear. The removed thumbnails will not be displayed on the next paint.
|
If the Thumbnail was generated with an Hbitmap that was obtained through ToHbitmap, the application must call DisposeHbitmap to free all resources associated with the Hbitmap. |
C# |
Copy Code
|
// Create and add some thumbnail items.
ThumbnailItem item1 = ThumbnailXpress1.CreateThumbnailItem("c:\\1.jpg", 0, ThumbnailType.Image);
ThumbnailXpress1.Items.Add(item1);
ThumbnailItem item2 = ThumbnailXpress1.CreateThumbnailItem("c:\\2.jpg", 0, ThumbnailType.Image);
ThumbnailXpress1.Items.Add(item2);
ThumbnailItem item3 = ThumbnailXpress1.CreateThumbnailItem("c:\\3.jpg", 0, ThumbnailType.Image);
ThumbnailXpress1.Items.Add(item3);
ThumbnailItem item4 = ThumbnailXpress1.CreateThumbnailItem("c:\\4.jpg", 0, ThumbnailType.Image);
ThumbnailXpress1.Items.Add(item4);
// Remove item2.
ThumbnailXpress1.Items.Remove(item2);
// Remove the first thumbnail item.
ThumbnailXpress1.Items.RemoveAt(0);
// Remove all thumbnail items.
ThumbnailXpress1.Items.Clear();
|
See Also