ImageGear .NET v25.2 - Updated
The GUI Thumbnail Window
Developer Guide > How to Work with... > Common Operations > Viewing > Viewing in Windows Forms > The GUI Thumbnail Window

The ImageGear.Windows.Forms.Thumbnail Namespace provides The GUI Thumbnail Window.

The GUI Thumbnail Control provides the ability to work with thumbnail images displayed on a thumbnail browser window. Each thumbnail is associated with an ImGearThumbnailItem Class object, which contains full information about the image. The collection of ImGearThumbnailItem Class objects is implemented within the ImGearThumbnailCtl Class.

When the application program runs, the thumbnail browser appears as a series of image buttons on the window.

This section provides information about how an application interacts with the GUI Thumbnail control in the following ways:

Loading

The thumbnail items are created in response to calls to DirectoryAppend Method, FileAppend Method, PageAppend Method, or DocumentAppend Method. The thumbnail items can also be created in response to the user dragging and dropping a file-icon from Windows Explorer onto the ImGearThumbnailCtl Class control. This will cause the BeforeLoad and AfterLoad event handlers to be called exactly as if the FileAppend Method had been called.  

Sorting

The thumbnail items are displayed unsorted by default. The application can re-sequence them by calling Sort. The call to Sort can specify that the items should be sorted by title (ascending or descending), or that a custom sort sequence can be provided. A custom sort sequence is implemented via a SortComparer interface. 

Selecting

When the user clicks on a thumbnail item in the display, any of several things will happen (depending on the way that ImGearThumbnailCtl Class properties are set, and how the mouse button is used):

Left-click to select an item under the cursor. If the MultiSelect Property value is set to false, then all other items are deselected. Double-clicking fires an event with the Index parameter set to the item being clicked. If this parameter is equal to -1 then the cursor is outside any thumbnail image. Typically, this event causes the application to load the corresponding image into the main program window.

Right-click to show the thumbnail magnifier if the ShowMagnify Property has been set to true. Releasing the right mouse button will hide the magnifier.

ImGearThumbnailCtl Class will automatically change the appearance of the selected thumbnail item, as per the SelectionBackColor Property and SelectionForeColor Property.

The application can also apply a different appearance to selected thumbnail items, called "Highlighting" them. Each thumbnail item has a Highlighted Property that can be set by the application. When the Highlighted Property is set, the thumbnail item's appearance is determined by the HighlightBackColor Property and HighlightForeColor Property.

ImGearThumbnailCtl Class supports MultiSelect. If the MultiSelect Property is set to true, then the user can select multiple thumbnail items at a time (using Ctrl-click and Shift-click).  

Dragging

ImGearThumbnailCtl Class control supports internally implemented Drag-and-Drop operations that can be enabled or disabled via the DragDropOptions Property. If the ImGearDragDropOptions Enumeration.Drag flag is set, then the thumbnail browser will operate as a source of file Drag operation. If the ImGearDragDropOptions Enumeration.Drop flag is set, then the thumbnail browser will be able to receive the image files via a Drop operation. 

Is this page helpful?
Yes No
Thanks for your feedback.