Working with ListBoxes in a Windows Phone Application: Listing 1.

XAML for creating a ListBoxItemTemplate.

<ListBox x:Name="ContactListBox" >
    <DataTemplate x:Key="ListBoxItemTemplate">
    <TextBlock Text="{Binding}" 
                 Style="{StaticResource PhoneTextLargeStyle}" 
    <StaticResource ResourceKey="ListBoxItemTemplate"/>
  <sys:String>Item 1</sys:String>
  <sys:String>Item 30</sys:String>

About the Author

Nick Randolph runs Built to Roam, a consulting company that specializes in training, mentoring and assisting other companies build mobile applications. With a heritage in rich client applications for both the desktop and a variety of mobile platforms, Nick currently presents, writes and educates on the Windows Phone platform.

comments powered by Disqus


.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events