ListBox is an items control, which means that you can populate it with items that contain text or other controls.
By default, the
ListBox control allows the user to select a single item in the list. Multiple items can be selected if the
ListBox.SelectionMode property is set to
Multiple (see the previous section on the
CheckBox control, where a
ListBox was used to display a data bound collection).
ListBox control contains a list of
ListBoxItem controls. The
ListBox control is a remarkably flexible control because it allows you to not only display
ListBoxItems, but because the
ListBoxItem control is a
ContentControl any kind of object can be placed in a
ListBox (see Figure 5.12).