List Box

A List Box control displays a collection of selectable items. A list box typically contains list box items; however, it can also contain a list of any of the available controls.

A list box has horizontal and vertical scrolling capabilities. When the number of list items exceeds the list box’s defined area, a vertical scroll bar automatically appears. The placement of items within the list box can be adjusted through the box’s FlowDirection and VerticalContent Alignment or HorizontalContentAlignment properties.

By default, the SelectionMode property is set to single, which allows only a single item to be selected from the list box. You can change the SelectionMode property to allow an operator to select multiple non-contiguous items or a combination of contiguous and non-contiguous items.

A list box has no Content property; the items collection is the content. Changes to list box items can be made by adjusting certain properties of the list box itself. For example, a change to the list box’s FontSize property cascades through the box’s entire list of items.

See Items Controls to view the usage and description of the properties for this control.