TechNet
Products
IT Resources
Downloads
Training
Support
Products
Windows
Windows Server
System Center
Microsoft Edge
Office
Office 365
Exchange Server
SQL Server
SharePoint Products
Skype for Business
See all products »
Resources
Channel 9 Video
Evaluation Center
Learning Resources
Microsoft Tech Companion App
Microsoft Technical Communities
Microsoft Virtual Academy
Script Center
Server and Tools Blogs
TechNet Blogs
TechNet Flash Newsletter
TechNet Gallery
TechNet Library
TechNet Magazine
TechNet Wiki
Windows Sysinternals
Virtual Labs
Solutions
Networking
Cloud and Datacenter
Security
Virtualization
Updates
Service Packs
Security Bulletins
Windows Update
Trials
Windows Server 2016
System Center 2016
Windows 10 Enterprise
SQL Server 2016
See all trials »
Related Sites
Microsoft Download Center
Microsoft Evaluation Center
Drivers
Windows Sysinternals
TechNet Gallery
Training
Expert-led, virtual classes
Training Catalog
Class Locator
Microsoft Virtual Academy
Free Windows Server 2012 courses
Free Windows 8 courses
SQL Server training
Microsoft Official Courses On-Demand
Certifications
Certification overview
Special offers
MCSE Cloud Platform and Infrastructure
MCSE: Mobility
MCSE: Data Management and Analytics
MCSE Productivity
Other resources
Microsoft Events
Exam Replay
Born To Learn blog
Find technical communities in your area
Azure training
Official Practice Tests
Support options
For business
For developers
For IT professionals
For technical support
Support offerings
More support
Microsoft Premier Online
TechNet Forums
MSDN Forums
Security Bulletins & Advisories
Not an IT pro?
Microsoft Customer Support
Microsoft Community Forums
Sign in
Home
Library
Wiki
Learn
Gallery
Downloads
Support
Forums
Blogs
Resources For IT Professionals
United States (English)
Россия (Pусский)
中国(简体中文)
Brasil (Português)
Skip to locale bar
Page Details
First published by
tonysoper_MSFT
When:
4 Jan 2011 9:59 PM
Last revision by
Ed Price - MSFT
(aMicrosof)
When:
4 Jul 2012 12:26 PM
Revisions:
5
Comments:
0
Options
Original
Wiki
>
TechNet Articles
>
Introduction To Windows Phone 7 Project Structure - [Part-2]
>
Original
Introduction To Windows Phone 7 Project Structure - [Part-2]
You are currently reviewing an older revision of this page.
Go to current version
In this article I am going to describe Silverlight Windows Phone7 project structure. Let me introduce, basic information about the Silverlight project for Windows Phone 7.
Let’s get familiar with Silverlight
Why Silverlight for Windows Phone 7?
Silverlight is the application development platform for Windows Phone7, it supports core Silverlight capabilities in managed .NET code with XAML including: vector and bitmap graphics and animation, high quality video and audio streaming. In Windows Phone7 Silverlight we can also access the unique capabilities for Phone like telephone functionality, camera, multi-touch, location awareness, smooth navigation and so many compiling UI features. High performance gaming is also supported through the XNA Framework.
What is XAML?
XAML is (pronounced "zammel") standard for eXtended Application Markup Language. XAML is an XML file, which follows the basic rules of XML. In Silverlight, XAML is used to design user interfaces and animations.
Understand the Silverlight project structure for Windows Phone7.
A Silverlight Windows Phone 7 project contains various configuration, assembly references, and code files:
1) App.xaml
2) MainPage.xaml
3) ApplicationIcon.png
4) Background.png
5) SplashScreenImage.png
Let us have a glance at the Silverlight Windows Phone 7 Project files.
1- App.xaml
App.xaml file is the application starting point, which loads the entire Silverlight application. Here we can declare shared resources, brushes, various style objects, styles, templates etc. which will be accessible in the application. The App.xaml.cs file used to handle global application level events like Application_Launching, Application_Activated, Application_Deactivated, Application_Closing, RootFrame_NavigationFailed and Application_UnhandledException.
2- MainPage.xaml
The “MainPage.xaml” is default page with some UI element. It is actually a startup UI for Silverlight application in Windows Phone 7. Here we can use the Silverlight controls for developing user interface with different layouts. The MainPage.xaml.cs file is a code-behind for the main page of an application.
3- ApplicationIcon.png
As name itself suggests, it is application icon. That icon will appear in the list of applications on the phone. This is created by default in WP7 project. Developer can change PNG image as per his/her requirement. ApplicationIcon.png is 62 x 62 pixels with 72 pixels / inch resolution.
4- Background.png
This is also an icon image; this image is displayed when the application is "pinned" to the Start screen of Windows Phone. It has 173x173pixels. In addition to pin the application onto Start screen of Windows Phone, click on the application icon and hold it, then select the "pin to start" option. The Background.png image will now appear on the Start screen.
5- SplashScreenImage.png
A splash screen is an image that appears while a program/application is loading. It also describes the introduction of application.
Note: These three (ApplicationIcon.png, Background.png, SplashScreenImage.png) files property, by default set as Build Action - "Content" AND the copy to Output Directory be set to "Copy if newer".
In Silverlight WP7 Deployment File is called .XAP file which is the compressed output of the Silverlight Application which includes application manifest file, compiled output assembly and other resources used by your Silverlight WP7 application. I will explain how to deploy WP7 application in Windows Phone 7 Emulator or device. We will discuss later about deployment in this series.
Thank you :)
Revert to this revision