Welcome!

XML Authors: Jnan Dash, Sandi Mappic, Max Katz, Yakov Fain, Keith Mayer

Blog Feed Post

Android to Windows 8 Part 2: Creating Your First Windows Store 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 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 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 8 by creating a Windows Store project. The Windows Store 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 Store 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 Store project.

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

  4. Select the Blank App (XAML) 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.

 

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:

  • Blank App (XAML) – A single-page project for a Windows Store app that has no predefined controls or layout. This is the template you used for your project.
  • Grid App (XAML) – A three-page project for a Windows Store app that navigates among grouped items arranged in a grid. Dedicated pages display group and item details.
  • Split App (XAML) – A two-page project for a Windows Store app that navigates among grouped items. The first page allows group selection while the second displays an item list alongside details for the selected item.
  • Class Library (Windows Store apps) – A project that creates a managed class library for Windows Store apps or Windows Runtime components.
  • Windows Runtime Component – A project for a Windows Runtime component that can be used by Windows Store apps, regardless of the programming languages in which the apps are written. (More on that in a moment)
  • Unit Test Library (Windows Store apps) – A project that contains unit tests that can be used to test Windows Store apps, Windows Runtime components, or class libraries for Windows Store apps.

     

For the sake of this walkthrough you’ll be using a combination of XAML and C# to create your first Windows Store app. XAML (eXtensible Application Markup Language) is nothing more than a declarative language used to create the UI for Windows Store 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 Store 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

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