Back to Devexpress

GalleryDropDown.GalleryCustomDrawItemImage Event

windowsforms-devexpress-dot-xtrabars-dot-ribbon-dot-gallerydropdown-03e50aa0.md

latest4.5 KB
Original Source

GalleryDropDown.GalleryCustomDrawItemImage Event

Enables images of items in the GalleryDropDown control’s gallery to be painted manually.

Namespace : DevExpress.XtraBars.Ribbon

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Events")]
public event GalleryItemCustomDrawEventHandler GalleryCustomDrawItemImage
vb
<DXCategory("Events")>
Public Event GalleryCustomDrawItemImage As GalleryItemCustomDrawEventHandler

Event Data

The GalleryCustomDrawItemImage event's data class is GalleryItemCustomDrawEventArgs. The following properties provide information specific to this event:

PropertyDescription
BoundsGets the bounding rectangle of the Gallery item currently being painted.
CacheGets an object which specifies the storage for the most used pens, fonts and brushes.
GalleryGets the Gallery that contains the processed Gallery item. Inherited from GalleryItemEventArgs.
HandledGets or sets whether an event was handled. If it was handled default painting isn’t required.
InRibbonGalleryLinkFor In-Ribbon galleries, gets the bar item link that displays the current gallery. Inherited from GalleryItemEventArgs.
ItemGets the Gallery item currently being processed. Inherited from GalleryItemEventArgs.
ItemInfoGets the information which is required to paint a Gallery item.

The event data class exposes the following methods:

MethodDescription
DrawHtml(HtmlTemplate, DxHtmlPainterContext, Action<DxHtmlPainterArgs>)Paints the required HTML template inside an element that raised this event. The context parameter allows you to assign an object that transfers mouse events to template elements.
DrawHtml(HtmlTemplate, Action<DxHtmlPainterArgs>)Paints the required HTML template inside an element that raised this event.

Remarks

This event is equivalent to the BaseGallery.CustomDrawItemImage event of the GalleryDropDown.Gallery object. See the BaseGallery.CustomDrawItemImage topic for more information.

See Also

CustomDrawItemImage

GalleryDropDown Class

GalleryDropDown Members

DevExpress.XtraBars.Ribbon Namespace