ImageGear for .NET User Guide > Using ImageGear for .NET > Using ImageGear.Windows.Controls Namespace > Thumbnail Control > ART Marks in Thumbnails |
When a thumbnail item is first generated, a new ImGearARTPage is created for the thumbnail item and added to the ART page cache. The MarksLoading event fires for each generated thumbnail item and can be used to specify the ImGearARTPage that is associated with the thumbnail item. For example, the code below loads in each generated thumbnail item a text mark with the thumbnail caption as the text. The ImGearThumbnailList LoadAllARTPages method can be used to fire the MarksLoading event for all thumbnail items that do not have an associated ImGearARTPage. The ImGearThumbnailList DisplayMarks property can be set to false to not display ART marks in thumbnails.
C# Example |
Copy Code |
---|---|
private void thumbnailList_MarksLoading(object sender, ImGearMarksLoadingEventArgs e) { // Load a text mark with the caption of the thumbnail item. ImGearARTText text = new ImGearARTText(new ImGearRectangle(80, 90, 140, 120), e.Item.Caption, new ImGearRGBQuad(255, 255, 255)); text.FontSize = 40; text.FillColor = new ImGearRGBQuad(0, 0, 255); artPage.AddMark(text, ImGearARTCoordinatesType.IMAGE_COORD); e.ARTPage = artPage; } |
If the ImGearThumbnailList SelectedPageDisplay property is bound to a PageView Display and the marks are modified in the PageView Display, the modified ImGearARTPage for the selected thumbnail item will be updated in the ART page cache. The ImGearThumbnailList ARTPageCache property can be used to access the ImGearARTPages associated with thumbnail items. For example, when your application is closing, you can iterate through the ImGearARTPages and check the ImGearARTPage MarksChanged property to determine if an ImGearARTPage should be saved.