10 Reasons to Upgrade to the Windows Phone SDK 7.1: Listing 1.
Offloading images to a background thread
- By Nick Randolph
- 01/09/2024
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.