Skip to main content

BaseListBoxControl.Templates Property

Stores regular item templates used to render listbox items.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Layout")]
public ItemTemplateRepositoryBase Templates { get; }

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.

ListBoxControl-ItemTemplateDesigner-NotEmpty

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 initially used to render all items.

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

See the following topic to learn more: Templated ListBox Items.

See Also