BaseListBoxControl.Templates Property

Provides access to the collection of item templates used to render listbox items.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v21.2.dll


public ItemTemplateRepositoryBase Templates { get; }

Property Value

Type Description

The item template collection.


ListBox controls can render their items based on an item template that you can create at design time (with the Item Template Designer) or in code.


The ListBox control stores item templates in the Templates collection. If this collection is not empty, the ListBox control switches from default item rendering to template-based item rendering. To revert to default rendering, delete existing item templates.

The first template in the Templates collection becomes the active one, and it is used to render all items (by default).

You can create more templates and apply them to different items or in different cases by handling the BaseListBoxControl.CustomItemTemplate event.

See Templated ListBox Items to learn more.

See Also