Introduction
This article uses the step by step mode to describe how to build a Windows Phone 7 Development Environment from 0, if a simple Windows Phone 7 program is developed. It's just an introductory article, but it's easy to develop Windows Phone 7. Let's develop Windows Phone 7 together.
Windows 7 Installation
Currently, Windows Phone 7 only supports Windows 7 and Vista. I recommend Windows 7. The following describes how to build a Windows 7 environment.
Prerequisites
1. Windows XP system.
2. 100 Gb hard disk space
3. 2 GB memory
4. If you want to develop an xNa program, the display card supports DirectX 10 or a later version, along with the wddm 1.1 driver.
Installation Steps
1. Download Windows 7 ISO
2. Download Windows 7 USB/DVD download Tool
Download Windows 7 USB/DVD download tool in the http://store.microsoft.com/Help/ISO-Tool below
3. Install Windows 7 USB/DVD download tool.
Format a USB disk larger than 4 GB.
Run Windows 7 USB/DVD download tool.
Select the ISO file path.
Select USB device
Select a USB drive letter.
The ISO is automatically stored on the USB disk.
Restart the machine to automatically enter the installer and click Next next to complete the installation. The installation program is simpler than Windows XP, and the network does not need to be manually configured. You can use it normally.
Installation in Windows Phone 7 Development Environment1. Download Windows Phone Developer Tools CTP-CMDL refresh
To http://www.microsoft.com/downloads/details.aspx? Displaylang = en & familyid = cabcd5ed-7dfc-4731-9d7e-3220603cad14 Download Windows Phone Developer Tools CTP-starter l refresh, which contains all of the following components, one installation is OK.
Visual Studio 2010 express for Windows Phone CTP
Windows Phone emulator CTP
Silverlight for Windows Phone CTP
XNa game studio 4.0 CTP
2. Click to install vm_web.exe.
Click Install now
Click accept. This is the Free Software, enjoy it.
The installation is completed in about 20 minutes and the machine needs to be restarted.
Write the first Windows Phone 7 programStart Visual Studio 2010 express for Windows Phone
Open the welcome page. Here are some links to download documents and Videos related to Windows Phone 7.
Create a window phone application project called helloworldwindowsphone.
Modify textblock textblockpagetitle and textblocklisttitle of mainpage. Xmal
Code snippet
- <! -- Titlegrid is the name of the application and page title -->
- <Grid X: Name = "titlegrid" grid. Row = "0">
- <Textblock text = "Hello world application" X: Name = "textblockpagetitle" style = "{staticresource phonetextpagetitle1style}"/>
- <Textblock text = "Say hello World" X: Name = "textblocklisttitle" style = "{staticresource phonetextpagetitle2style}"/>
- </GRID>
Add a button
Code snippet
- <! -- Contentgrid is empty. place new content here -->
- <Grid X: Name = "contentgrid" grid. Row = "1">
- <Button content = "say hi" Height = "70" horizontalalignment = "Left" margin = "144,65, 160 "name =" button1 "verticalignment =" TOP "width =" "Click =" button#click "/>
- </GRID>
Add button to process events
Code snippet
- Private void button#click (Object sender, routedeventargs E)
- {
- Textblocklisttitle. Text = "say hi! ";
- }
A demo program is complete.
Click F5 to start emulator for debugging.
Go to the program we compiled.
Click
The development environment of Windows Phone 7 is very easy to deploy. Start the journey of Windows Phone 7. What are you waiting? Let's go!