windowsforms-devexpress-dot-xtragrid-dot-views-dot-tile-dot-tileview-e9cee400.md
Occurs whenever a tile within this TileView needs to load its background image asynchronously and allows you to manually pass the desired image.
Namespace : DevExpress.XtraGrid.Views.Tile
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DXCategory("Data")]
public event ThumbnailImageEventHandler GetThumbnailImage
<DXCategory("Data")>
Public Event GetThumbnailImage As ThumbnailImageEventHandler
The GetThumbnailImage event's data class is ThumbnailImageEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| DataSourceIndex | Gets the index of the currently processed item among other items in the source (the item’s index in the bound data source for data-aware controls, e.g., GridControl). |
| DesiredThumbnailSize | Stores the desired size of thumbnail images, generated using the ThumbnailImageEventArgs.CreateThumbnailImage method. |
| ThumbnailImage | Gets or sets the image that will be assigned to an item that fired this event. |
The event data class exposes the following methods:
| Method | Description |
|---|---|
| CreateThumbnailImage(Image, Size) | Creates a thumbnail image of the specific size. This image will be later assigned to an item that supports the asynchronous image load feature. |
| CreateThumbnailImage(Image) | Creates a thumbnail image that will be assigned to an item that supports the asynchronous image load feature. |
| ResetImageCache() | Resets the image cache and causes all items that are not currently visible to reload their images when displayed again. |
See the TileView.OptionsImageLoad property to learn more.
Important
The GetThumbnailImage event is raised from a non-UI thread.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetThumbnailImage event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-grid-tileview-thumbnails-async-load/CS/TileView-ManualThumbs/Form1.cs#L26
tileView1.OptionsTiles.ItemSize = new Size(90, 40);
tileView1.GetThumbnailImage += TileView1_GetThumbnailImage;
// Specify a column that provides information on images to render.
winforms-grid-tileview-thumbnails-async-load/VB/TileView-ManualThumbs/Form1.vb#L23
tileView1.OptionsTiles.ItemSize = New Size(90, 40)
AddHandler tileView1.GetThumbnailImage, AddressOf TileView1_GetThumbnailImage
' Specify a column that provides information on images to render.
See Also