Provides the ability to perform custom painting of the ToolboxControl visual elements.
[DXCategory("Events")] public event ToolboxCustomDrawElementEventHandler CustomDrawElement
<DXCategory("Events")> Public Event CustomDrawElement As ToolboxCustomDrawElementEventHandler
The CustomDrawElement event's data class is DevExpress.XtraToolbox.ToolboxCustomDrawElementEventArgs.
The CustomDrawElement event fires when a particular ToolboxControl visual element is about to be painted, and allows you to perform custom painting of that element. Using the CustomDrawElement event, you can custom paint groups, items, the Menu, Expand, More items, and scroll buttons. To retrieve the information about the visual element being painted, use the ToolboxCustomDrawElementEventArgs.ElementInfo property.
To perform the default painting of the element background, image or caption, call the arguments' DrawBackground, DrawImage or DrawCaption method, respectively.
If you custom paint a visual element using the CustomDrawElement event, set the ToolboxCustomDrawElementEventArgs.Handled parameter to true to prevent the default painting mechanism from being invoked after your CustomDrawElement event handler is completed. Otherwise, your painting will be overridden by the default painting mechanism.