Windows Phone 7 development platform to build on VS 2010
Windows 7 development platform
Ready to build WP7 development environment on your computer?
First, install VS2010, upgrade to SP1 , and install the Windows Phone SDK 7.1 RC , you can start writing WP7 program. Here we have to write a simple Hello World program.
Open VS2010, choose File-> New-> Project ... to open the New Project dialog box. Select the Windows Phone Application.
In the screen below, you can choose to develop based on WP 7.0 or 7.1, we take 7.0 for example.
You can see, our system automatically generates two xaml files, and two corresponding cs files. MainPage.xaml in the main interface of the program is, we may need to add content.
In MainPage.xaml, specifies the main interface design. Interface design through a hierarchical structure of XML-like exhibit. All the main interface elements are LayoutRoot under. Now we want to display a text box and a button on the main interface, you can add the following code to ContentPanel:
After clicking the relevant buttons , you need to add an event handler in the Button. To define event handlers, there are two ways: one is defined in xaml
directly, other is to add an event response function in the C # code. Here we used the former.
Button's about to change the definition of the statement: