01. Project Template

Series Logo

On my first post in the “Discover Windows Phone” development series  we’re going to take a look at the default Windows Phone project template you generally will start with in Visual Studio 2013.

Windows Phone Application:
1. Open Visual Studio 2013
2. File> New Project
3. Under Visual C#>Choose Windows Phone> Windows Phone ApplicationVisualStudio

The left pane is the Designer View and the right pane is the XAML Viewdesignerxaml

Solution Explorer

Solution Explorer

Lets take a look at the Solution Explorer for a default project and see what does it contain and the purpose of each.

AppManifest.xml
A simple application manifest file that is required to generate the application package (XAP) for store submission.

AssemblyInfo.cs
Another configuration file that contains the name and version metadata ,including the copyrights, that is embedded into the generated assembly file.

WMAppManifest.xml
Another metadata field that contains application specific data that are categorized into four parts
1. Application UI; Display Name, description, app icon, first page to navigate to, etc.
2. Capabilities; this is where you tell the device that you will use capabilities like accessing user’s contacts or using location services, etc.
3. Requirements; This part is where you specify some hardware requirements needed to run the application, like NFC.
4. Packaging; this is where to specify some data about the packaging file, like author, version, publisher, etc.

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.

AppResources.resx
For localizing the applicartion, basically you need to separate localizable resources from the rest of the code by creating language-specific resource files. Visual Studio uses these files to create assemblies that allow your application to support many languages.

App.xaml
It is where you keep universal data and settings for your entire application.  You can also keep my style data in this file as well, but it’s not required to do so.

App.xaml.cs
The code-behind for App.xaml (any .xaml file has a .cs file for the code behind), this is where you will handle the back-end of your application.  

MainPage.xaml
Your first application page (unless you change it in WMAppManifest.xml). Don’t make it the only page in the application. The phone handles forward and backward navigation very well, and you should not bury all of your application’s functionalities on one xaml file.

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.


That was a brief about the project Solution Explorer, next post will be covering Page Navigation
For any feedback or questions:

hotmail-icon

yasmine.abdelhady@hotmail.com

twitter-icon-hover@yasabdelhady