The second of the three approacesh to filling an items control requires explicitly defining the contents in XAML. The ItemsControlsFromXaml project uses this approach to fill an ItemsControl and two ListBox controls. The Items property defined by ItemsControl is the content property of the control, so in XAML all you need to do is put a bunch of objects between the begin and end tags of the particular items control.
In anticipation of formatting some strings in data bindings, a StringFormatConverter is included in the Resources collection of the program’s MainPage.xaml file:
Example 17-6. Silverlight Project: ItemsControlsFromXaml File: MainPage.xaml (excerpt)
<phone:PhoneApplicationPage.Resources> <petzold:StringFormatConverter ...