by brad
22. October 2010 06:00
When you install the Windows Phone Developer tools, five project templates for phone development will be installed under the “Silverlight for Windows Phone” category. Today’s tip focuses on the first two of these templates: Windows Phone Application and Windows Phone Databound Application.
![CropperCapture[2] CropperCapture[2]](http://www.codebadger.com/blog/image.axd?picture=CropperCapture%5B2%5D_thumb.jpg)
Windows Phone Application
![CropperCapture[3] CropperCapture[3]](http://www.codebadger.com/blog/image.axd?picture=CropperCapture%5B3%5D_thumb.jpg)
Windows Phone Application is the vanilla template and will create a blank project for you with one blank page called “MainPage.xaml”. You’ll have your application icon, background image, and splash screen image all created in the root of the project. If you are looking for a do-it-yourself experience or want to start from scratch, this is the template for you.
Windows Phone Databound Application
![CropperCapture[4] CropperCapture[4]](http://www.codebadger.com/blog/image.axd?picture=CropperCapture%5B4%5D_thumb.jpg)
The Windows Phone Databound Application template creates a project with a model-view-viewmodel (MVVM) app pretty much built for you, although it’s very simple and built with dummy data. This template is a great example of data-binding, sample data, the MVVM pattern, and navigation. Even if you never start a project from this template, it’s worth looking at as a reference.
You’ll get two pages with the template: MainPage.xaml and DetailsPage.xaml, each with their own view model. The main page is databound to both sample data (for design time) and faked-up data (for run time). The sample data is included and can be edited through a UI with Expression Blend or manually with Visual Studio.
The two pages are pre-wired for navigation. The main page navigates to the details page when an item is selected and the details page kicks off a custom animation before navigating back to the main page when the hardware back button is pressed.
Stay tuned for coverage of the remaining three templates.
Other Resources
More Tips