Build the first Windows Phone application

Source: Internet
Author: User

After installing the development environment, we will compile our first Windows Phone application.ProgramRight. For usProgramming LanguageOr we are familiar with the first program we have written. Helloworld.

OK. Make a simple hello World with me. Open Microsoft Visual Studio 2010 express for Windows Phone => file => new project =>

 

We can see two parts. One is Silverlight for Windows Phone and the other is xNa game studio 4.0. Select Windows Phone application => name to enter helloworld. Solution can be the same as name. => OK.

Pull a textblock and button control to the mainpage. XAML form. In addition, the text attribute value of textblock is cleared. Change "name" to "mytextblock. Button" control, and change "name" to "mybutton". Change "content attribute value to" Click me ", as shown in the following figure:

 

Double-click the "Click me" button to jump to mainpage. XAML. CS.

ImplementationCodeAs follows:

 

Private VoidMybutton_click (ObjectSender, routedeventargs E)
{
StringMyvalue ="Hello World";
Mytextblock. Text = myvalue;
}

Now build. F5. Loading the simulator for the first time may be slow. Then the simulator will be disconnected from the program, and our program will be loaded into the simulator. You can stop turning off the simulator. So that we can continue writing other programs.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.