Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.
In this example the BaseGallery.CustomDrawItemImage event is handled to manually paint item images within the Font Color Gallery. Individual items correspond to specific colors.
The full source code can be found in the ‘Ribbon Simple Pad’ demo supplied with the XtraBars.
PrivateSub gddFontColor_Gallery_CustomDrawItemImage(ByVal sender AsObject, _
ByVal e As GalleryItemCustomDrawEventArgs) _
Handles gddFontColor.GalleryCustomDrawItemImage, _
rgbiFontColor.GalleryCustomDrawItemImage
Dim clr As Color = CType(e.Item.Tag, Color)
Dim brush As brush = New SolidBrush(clr)
Try
e.Cache.FillRectangle(brush, e.Bounds)
e.Handled = TrueFinallyCType(brush, IDisposable).Dispose()
EndTryEndSub
Was this page helpful?
Thanks for your feedback!
How can we improve this help topic?
Additional comments/thoughts:
If you have any questions, submit a ticket to our Support Center.