Welcome!

XML Authors: Michael Bushong, Elizabeth White, Jason Bloomberg, Jayaram Krishnaswamy, David Weinberger

Blog Feed Post

Android to Windows Phone 8 Part 2: Creating Your First Windows Phone Project

Over the past several weeks I’ve been working on some content I’m excited to finally share with you through a series of blog posts. This series will introduce you to Windows Phone 8 development from an Android developer’s perspective. Through the course of the series you’ll create your first app. It won’t be anything pretty, but you’ll learn the ins and outs of the development environment, how to create a simple user interface, and how to perform navigation. Along the way you’ll see some Android Hints that will help make it easier for you to transition your existing skills to the Windows Phone platform. You’ll also see some Visual Studio Tips to make you more productive in your development environment. Good luck!

In the last lesson you set up your development environment which included installing Visual Studio. In Visual Studio, you create apps for Windows Phone by creating a Windows Phone project. The Windows Phone project contains all the files that comprise the source code for your app. Visual Studio makes it incredibly easy to start a new project with a set of default files and directories.

ANDROID HINT

The Windows Phone project template in Visual Studio is similar to the Android Application Project template that is added to Eclipse when you install the ADT Plugin.

 

In this lesson you’ll learn how to create your first Windows Phone project.

  1. Open Visual Studio 2012 Express for Windows Phone.
  2. Click New
    in the toolbar.
  3. In the window that appears select Installed > Templates > Visual C# > Windows Phone.

  4. Select the Windows Phone App template.
  5. Enter a Name for your project. This is the name of your project directory and the name visible in Visual Studio’s Solution Explorer.

ANDROID HINT

Solution Explorer is similar to Package Explorer in Eclipse.

 

  1. Select a Location for your project. This is where your source files will be stored on your local disk.

ANDROID HINT

This is similar to a Workspace used by Eclipse.

 

  1. Enter a Solution name. Solutions are how Visual Studio organizes multiple projects. Be default Visual Studio will use your project’s name as the solution name.
  2. Click OK.
  3. You’ll then be prompted to select which Windows Phone platform you want to target.

    Select Windows Phone OS 8.0 and click OK.

 

You may have noticed that Visual Studio has quite a few project templates for you to select from. Here’s a brief description of each template:

  • Windows Phone App – A project for creating a Windows Phone application.
  • Windows Phone Databound App – A project for creating a Windows Phone application using List and Navigation controls with a basic Model-View-ViewModel architecture.
  • Windows Phone Class Library – A reusable library for Windows Phone applications.
  • Windows Phone Panorama App – A project for creating a Windows Phone application using the Panorama control.
  • Windows Phone Pivot App – A project for creating a Windows Phone application using the Pivot control.
  • Windows Phone XAML and Direct3D App – A project for creating a Windows Phone managed application with native components.
  • Windows Phone XAML and XNA App – A project for creating a Windows Phone XAML application capable of rendering graphics using the XNA Framework.
  • Windows Phone HTML5 App – A project for creating a Windows Phone app that uses primarily HTML content.
  • Windows Phone Audio Playback Agent – A class library project for creating a background agent to play audio.
  • Windows Phone Audio Streaming Agent – A class library project for creating a background agent to stream audio.
  • Windows Phone Scheduled Task Agent – A class library project for creating a background agent to perform a periodic or resource intensive task.

     

For the sake of this walkthrough you’ll be using a combination of XAML and C# to create your first Windows Phone app. XAML (eXtensible Application Markup Language) is nothing more than a declarative language used to create the UI for Windows Phone apps. If you’ve done any Android UI development you’ll be very comfortable with XAML as it is simply an xml file. Just to be clear you are not limited to XAML and C# for your apps. You could use a combination of XAML and Visual Basic, XAML and Visual C++, or HTML and JavaScript to create your app.

Your Windows Phone project is now set up with some default files and you’re ready to being building your app. In the next lesson you’ll spend some time exploring the project you just created.

 

Previous Posts in this Series

  • Setting up the Development Environment

Additional Resources

Read the original blog entry...

More Stories By Adam Grocholski

Hey there! My name is Adam Grocholski, and I'm a Technical Evangelist at Microsoft where I spend time focusing on Windows, Windows Phone, and Windows Azure. I live in the frozen tundra of Minnesota and run thinkfirstcodelater.com. You can also follow me on twitter at @codel8r.