| By Adam Grocholski | Article Rating: |
|
| March 14, 2013 03:00 PM EDT | Reads: |
720 |
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 created your first Windows Store project. In this lesson you’ll spend some time exploring the project and learning about some key files and directories.
Package.appxmanifest

This is the application’s manifest. It is an XML document that contains the information the system needs to deploy, display, or update a Window Store app.
|
ANDROID HINT |
|
Package.appxmanifest is similar to the AndroidManifest.xml file used by Android applications. |
Here is some additional information about the manifest:
- It includes package identity, package dependencies, required capabilities, visual elements, and extensibility points.
- Every app package must include one package manifest.
- The manifest is digitally signed as part of the signing the app package.
- After signing, you can’t modify the manifest without invalidating the package signature.
- After the package has been installed, the package manifest file appears in the directory for the installed package.
If you double-click the manifest in the solution explorer you’ll get a UI you can use to edit the various properties of the manifest. For this app we’ll leave everything as is.
MainPage.xaml and MainPage.xaml.cs

As mentioned in the last lesson XAML (eXtensible Application Markup Language) is the declarative language used to create the UI for Windows Store applications. MainPage.xaml is the default page for your application. This is where you’ll create your simple UI (in the next lesson). MainPage.xaml.cs is the associated C# code that goes along with your UI.
|
VISUAL STUDIO TIP |
|
The *.xaml.cs file that is associated with a *.xaml file is called the code-behind file. |
|
ANDROID HINT |
|
The relationship between *.xaml and *.xaml.cs files is similar to the relationship between layouts and activities in Android development. When you create a generic Android app, you’ll get an activity_main.xml file in the res > layout |
App.xaml and App.xaml.cs

App.xaml can be used to store information about application wide resources. By default a ResourceDictonary is added that refers to the StandardStyles.xaml file in the Common directory. (More on that in a minute).
App.xaml.cs provides application-specific behavior to supplement the default application class. This is where the connection to MainPage.xaml as the default page for the application is wired up
|
ANDROID HINT |
|
In the generic Android app example I mentioned earlier, you set the default activity for the app in AndroidManifest.xml. Typically it looks something like this:
If you open up App.xaml.cs and navigate to the bottom of the OnLaunched method you’ll see the following:
This is what tells the app to display MainPage.xaml when it starts. |
Assets Directory
The Assets directory contains default artwork used for the application’s tiles, splash screen, etc.
|
ANDROID HINT |
|
The items contained in the Assets directory are similar to those found in the res/drawable-* directories of your Android projects. |
Common Directory
The Common directory contains resources used across the application. By default it contains one file, StandardStyles.xaml. This file gives you the styles you need for your app to look like a Windows 8 (i.e. Metro application). You are not required to use it, but it’s a great resource for those of us who are design challenged.
As you can see, Visual Studio gives you a lot for free so you can get started on your app. You should continue to explore your project set up as well as the files and directories that get created with the of the other project templates as Visual Studio does a lot of heavy lifting for you.
In the next lesson you’ll learn how to run your application.
Previous Posts in this Series
Additional Resources
- Resources for Android developers (Windows Store apps)
- API mappings from Android to Windows
- Getting started
- Designing UX for apps
- Developing apps
- Packaging your Windows Store apps using Visual Studio 2012
- Selling apps
- Concepts and architecture
- API reference
- Language reference
- End-to-end apps
Read the original blog entry...
Published March 14, 2013 Reads 720
Copyright © 2013 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
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.
- Cloud People: A Who's Who of Cloud Computing
- New Relic Q1 2013 Blazes Past Growth Targets and Reaches 40,000 Active Customer Accounts
- Cloud Expo New York: Delivering Digital Marketing on the Cloud
- Cloud Expo New York: Rethink IT and Reinvent Business with IBM SmartCloud
- The Accessibility of the Cloud
- Cloud Expo NY: Best Practices for Delivering Oracle Database as a Service
- Cloud Expo New York: Basics of SSD Technology and Its Use in Cloud
- Session Topics: 12th Cloud Expo / Cloud Expo New York
- Cloud Expo New York: The Big Challenge of Big Data & Hadoop Integration
- Measuring the Business Value of Cloud Computing
- What CIOs Need to Know About Enterprise Virtualization
- Cloud Expo New York: Build Modern Business Applications
- Cloud People: A Who's Who of Cloud Computing
- Cloud Expo New York: Best CIO Practices Shared from SHI’s Customers
- Cloud Expo New York: How to Use Google Apps Script
- New Relic Q1 2013 Blazes Past Growth Targets and Reaches 40,000 Active Customer Accounts
- Cloud Expo New York: Why Big Data Is Really About Small Data
- Small Cancers, Big Data, and a Life Examined
- Cloud Expo New York: Delivering Digital Marketing on the Cloud
- Cloud Expo New York: Requirements of a Cloud Database
- Cloud Expo New York: Rethink IT and Reinvent Business with IBM SmartCloud
- Cloudant to Exhibit at Cloud Expo & Big Data Expo New York
- The Accessibility of the Cloud
- Learn How To Use Google Apps Script
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- JavaServer Faces (JSF) vs Struts
- The i-Technology Right Stuff
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- What's New in Eclipse?
- Where Are RIA Technologies Headed in 2008?


























