BaseListBoxControl.Templates Property
Provides access to the collection of item templates used to render listbox items.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v19.2.dll
Declaration
Property Value
Type | Description |
---|---|
DevExpress.XtraEditors.TableLayout.ItemTemplateRepositoryBase | The item template collection. |
Remarks
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.