Random geekery since 2005.

Husband, father, programmer, speaker, writer, blogger, podcaster, collector, traveler, golfer.

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.

SNAGHTML269bf07

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.)

SolutionExplorer

ApplicationIcon.png

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.

App.xaml

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.

App.xaml.cs

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.

AppManifest.xml

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

AssemblyInfo.cs

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

Background.png

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.

MainPage.xaml

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.

MainPage.xaml.cs

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.

SplashScreenImage.jpg

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.

WMAppManifest.xml

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

 

Download This Code Example

download

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

Tags

18 responses to “31 Days of Windows Phone | Day #1: Project Template”

  1. John Avatar
    John

    Great blog, great series. Lots of good content and well-organized. Thank you!

  2. KevInKauai Avatar

    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?

  3. Portside Innovations Avatar
    Portside Innovations

    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.

  4. Justin James Avatar

    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.

    J.Ja

  5. Gambling Online Articles Avatar

    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.

  6. Commonwealth Games 2010 Delhi Avatar

    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.

  7. Casinos Online Articles Avatar

    Later, after spending hours on the Internet abound, accept a being who will surely start apperceive definitely not what they are discussing a column border on to admit that plenty of rich and wonderful real.

  8. Air Max 1 Avatar

    dispenses use a terrific web site decent Offers cheers for the exhausting work to assist folks*-*

  9. Baccarat Online Avatar

    Great Post Thanks To share with us

  10. Betting Easy Avatar

    Nice Post Thanks To share with us

  11. instant cash loans Avatar

    Neither a wise man nor a brave man lies down on the tracks of history to wait for the train of the future to run over him.

  12. cash advance network Avatar

    Conscience is the inner voice that warns us somebody may be looking.

  13. guaranteed payday loan Avatar

    I finally know what distinguishes man from other beasts financial worries. – Journals

  14. bad credit cash loans Avatar

    The proper office of a friend is to side with you when you are wrong. Nearly anybody will side with you when you are right.

  15. ez payday loan Avatar

    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.

  16. loan cash Avatar

    Genius means little more than the faculty of perceiving in an unhabitual way.

  17. KP Avatar

    Jeff, awesome series of blog post for WP7 Development.

  18. Stilgar Avatar

    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 )

Facebook photo

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

Connecting to %s

Create a website or blog at WordPress.com

%d bloggers like this: