O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ListBox

The 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).

The 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).

FIGURE 5.12 ListBoxItem and ComboBoxItem are derived ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required