31 Days of Windows Phone | Day #1: Project Template

On my first post of the 31 Days of Windows Phone, we need to set some expectations.

First, I’m assuming you are somewhat knowledgeable about Silverlight. I did a 31 Days of Silverlight series last year, so I’d recommend starting there if you’ve never used Silverlight before. ALL of the articles in this series will assume some basic knowledge about Silverlight.

Second, I’m assuming you’ve got all of the tools installed. To get them, you just need to head over to http://create.msdn.com and download them. You’ll get Visual Studio 2010 for Windows Phone, as well as Expression Blend 4 for Windows Phone. You’ll definitely need both of them, and they’re both completely free.  If you already have official versions of that software, it will just update the project templates instead of adding new software to your machine.

OK, on to the content!

Today, we’re going to take a look at the default Windows Phone project template you generally will start with in Visual Studio 2010: Windows Phone Application.


Solution Explorer

Here’s a look at the Solution Explorer for a default project.  I’m not going to provide the full contents of each file here, instead I’m just going to address the purpose of each.  If you want to see the contents, install the tools and give this a try!  It’s so freakin’ easy!  (I’ve also included a downloadable project file at the end of this article, if you’re feeling lazy.)



Replace this image with the one you want to represent your application on the phone.  This is what the users will see when they see your application on their phone.  Make it count.


Think of this much like an ASP.NET web.config file.  It is where you keep universal data and settings for your entire application.  I also prefer to keep my style data in this file as well, but it’s not required to do so.


The code-behind for the previous file, this is where you will handle “tombstoning” your application.  We will be covering the concept of multi-tasking and tombstoning on Day #14 of the 31 Days of Windows Phone.


A simple application manifest file that is required to generate the application package (XAP).


Another configuration file that contains the name and version metadata that is embedded into the generated assembly file.


This should be the image you use when your application is pinned to the Start screen.  It would be smart to incorporate similar artwork to what you used in ApplicationIcon.png.


Your first application page.  In nearly EVERY case, it should NOT be your only page.  The phone handles forward and backward navigation very well, and you should not bury all of your application’s functionality into ONE xaml file.  Break it up.  You’ll thank me later.  We’ll be covering page navigation in depth in tomorrow’s entry, Day #2 of the 31 Days of Windows Phone.


The code-behind for the MainPage.xaml file.  When you need to make things happen in code, this is where you’ll generally write it.  Interacting with the objects on the XAML file is almost always a necessity.  During this series, we’ll be covering a great deal of topics that will require writing code in this (and other xaml code-behind) files.


This is the default image that is displayed if your application takes time to load.  You can replace this with the image of your choice, but remember that this is really only meant to let the user know that they’re waiting for the actual application to load.


Another metadata field that contains application specific data, like title, icon locations, capabilities, etc.


Download This Code Example


Like I mentioned earlier, tomorrow’s post will be covering Page Navigation.  See you then!

18 thoughts on “31 Days of Windows Phone | Day #1: Project Template

  1. Tried the link (developer.windowsphone.com) and it leads me down a trail that eventually wants me to pay to join "App Hub" at $99. Not exactly free. What am I doing wrong?

  2. The development tools are free. To actually sign up for app hub and start submitting your applications, there is a $99 dollar fee. The reasons for the annual fee are due to the fact that Microsoft has incorporated a certification process that takes actual man hours to do. Microsoft has testers actually test your application to ensure that conforms to the guidelines that MS has set for the purpose to keep "junk" applications off the market. There are also services that MS has made available to developers to use for their applications such as push notifications. So to pay an annual fee to ensure that the market place isn't flooded with junk and your application may have a standing chance and doesn't get swept under the carpet, I think is worth every cent.

  3. Jeff –

    That workflow on that site needs to be fixed. NOW. I went to go get the developer tools (the link used to take you right to downloads) and I was brought to a site where "Step 4" was "Payment". You really think people are going to go through a wizard when it says "Payment" is a step to download the tools? C'mon. That should *not* be a listed step, it should say "Register for App Hub (optional)". Because I'm sure your abandonment rate is through the roof because it says "Payment" as a step.

    Oh, and the site is currently broken now, so I can't even get past Step 2.


  4. Can not acquire any advice on this position before. It thus has a website and if at any time to activate the analysis of some accounting for me, if possible, have fun, let me know, I always go to humans that quotes my site.

  5. I encourage you to start this blog, I could not acquire any advice on this position before. It thus has a website and if at any time to activate the analysis of some accounting for me, if possible, have fun, let me know, I always go to humans that quotes my site.

  6. It is easy to fly into a passion–anybody can do that–but to be angry with the right person and at the right time and with the right object and in the right way–that is not easy, and it is not everyone who can do it.

  7. I just wanted to mention that the cufon fonts are not displayed in IE9 unless the user clicks the compatibility mode. If I recall correctly this was because the developers of cufon used browser detection instead of feature detection and are unable to detect that IE9 supports canvas (and has dropped support for VML). A newer version of the library fixed the bug.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s