Address: http://www.cnblogs.com/tongyi/archive/2012/02/18/WindowsPhone1.html
Mobile development is a trend,ProgramI should keep learning. Now I start to learn Windows Phone 7 mobile development by myself. If you don't talk about anything else, start directly:
1. My development environment: (http://msdn.microsoft.com/zh-cn/library/ff402535%28v=vs.92%29.aspx)
* Windows 7Vdisual studio 2010 express for Windows Phone
* Install the Windows Phone SDK (Tool)
* Windows Phone emulator (simulator) can also use a Windows Phone real machine.
* Expression bleed, Silverlight, xNa
2. Basic concepts:
* Metro, zure, xNa, and Xmal
3. Create the first Windows Phone application
First look at the simulator:
* Create a project in vs 2010
Open: mainpage. XAML
<! -- Contentpanel-place other content here -->
<Grid X: Name = "contentpanel" grid. Row = "1" margin = "12,0, 12,0">
<Button content = "say hi" Height = "72" horizontalalignment = "Left" margin = "37,49, 160 "name =" button1 "verticalignment =" TOP "width =" "Click =" button#click "/>
</GRID>
Mainpage. XAML. CS
Private void button#click (Object sender, routedeventargs E)
{
Pagetitle. Text = "good morning! "; // Title
MessageBox. Show ("Welcome to Windows Phone 7 Application", "message", messageboxbutton. OK); // information box
This. navigationservice. navigate (New uri ("/second. XAML", urikind. Relative); // page Jump
}
Start debugging to see the effect:
Modification in wmappmanifest. xml
1. Set the default startup page
<Tasks>
<Defaulttask name = "_ default" navigationpage = "mainpage. XAML"/>
</Tasks>
2. Set the red box of the my first phoneapp icon
<Iconpath isrelative = "true" isresource = "false"> myico.gif </iconpath>
3. click the mouse on my first phoneapp and you can set it to start. backgroundimageuri can set the icon displayed by the program in start.
<Tokens>
<Primarytoken tokenid = "phoneapp1token" taskname = "_ default">
<Templatetype5>
<Backgroundimageuri isrelative = "true" isresource = "false"> mybackgroudimg.gif </backgroundimageuri>
<Count> 0 </count>
<Title> welcome </title>
</Templatetype5>
</Primarytoken>
</Tokens>
Well, the first Windows Phone application is basically complete. I wrote a blog for the first time, but the text and page layout were not ideal. Please forgive me and correct me. I hope to have more conversations with experts who like Windows Phone. Continue...