10 Reasons to Upgrade to the Windows Phone SDK 7.1: Listing 1.

Offloading images to a background thread

 with ImageSource.
<ListBoxItemsSource="{Binding Collection}" >
<ListBox.Resources>
<DataTemplate x:Key="ItemTemplate">
<StackPanel>
  <TextBlock Text="{Binding Name}"/>
<Image>
<Image.Source>
<BitmapImageCreateOptions="BackgroundCreation"
UriSource="{Binding Photo}" />
</Image.Source>
</Image>
</StackPanel>
</DataTemplate>
</ListBox.Resources>
<ListBox.ItemTemplate>
<StaticResourceResourceKey="ItemTemplate"/>
</ListBox.ItemTemplate>
</ListBox>

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

Featured

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events