DataTemplate and PhoneApplicationPage.Resources GotchaPosted: September 7, 2011
When building an interface for a windows phone 7 mobile app you may want to use what are called DataTemplates to build your UI in chunks. Something like a list of accounts, you might want to create a DataTemplate to represent the singular Account within in the UI and bind it to a single ‘Account’ Model. In most fo the examples I found online about this they all displayed the DataTemplate XAML but never in context. Well it turns out you can’t just add those anywhere.
DataTemplate is expected to live into a tag named PhoneApplicationPage.Resources. which lives inside your top level PhoneApplicationPage XAML tag.
So it should look like this: