Skip to main content
A newer version of this page is available. .

ListBoxControl Class

The list box control that displays a list of items that a user can select. Can be populated with items from a data source.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll


[ToolboxBitmap(typeof(ToolboxIconsRootNS), "ListBoxControl")]
public class ListBoxControl :


By default, the ListBoxControl renders its items as text strings.

ListBoxControl - class

The Item Templates feature helps you render each listbox item as your needs dictate. Each item can display multiple text and image elements arranged in any manner, and painted using different appearance settings.


The control’s main members include:

Search & Filtering

You can provide end-users with the ability to filter items in a ListBoxControl. For this purpose, attach the ListBoxControl to a SearchControl by using the SearchControl.Client property.

searchControl1.Client = listBoxControl1;

When an end-user types a search request into the SearchControl, the ListBoxControl automatically filters its items, and highlights the requested string in the filtered items.



If items are formatted using the HTML tags (see BaseListBoxControl.AllowHtmlDraw), the items are filtered, but not highlighted.


The following sample code demonstrates how to initialize and create a new instance of the ListBoxControl class at runtime.


using DevExpress.XtraEditors;
// ...
// Initialize an array of strings
string[] States = {
// Initialize and create an instance of the ListBoxControl class
ListBoxControl listBox = new ListBoxControl();
// Define the parent control
listBox.Parent = this;
// Set the listBox's background color
listBox.BackColor = Color.FromArgb(254, 246, 212);
// Dock to all edges and fill the parent container
listBox.Dock = DockStyle.Fill;
// Add items
See Also