A newer version of this page is available. Switch to the current version.

BaseListBoxControl.CustomItemTemplate Event

Allows you to provide a custom template for listbox items.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.2.dll


public event CustomItemTemplateEventHandler CustomItemTemplate

Event Data

The CustomItemTemplate event's data class is DevExpress.XtraEditors.CustomItemTemplateEventArgs.


When the template-based item rendering is used, all items are generated from the default template (this is the first template in the BaseListBoxControl.Templates collection). The CustomItemTemplate event allows you to dynamically provide templates for items, thus overriding the default template. You can create tile templates beforehand using the Item Template Designer (these templates will be stored in the BaseListBoxControl.Templates collection). While handling the CustomItemTemplate event, read a corresponding template from the Templates collection (which is also accessible from the Templates event parameter) and assign it to the Template event parameter.

See Also