Windows Phone 7 Development you must know

Source: Internet
Author: User
Tags silverlight visual studio 2010

    You must be aware of Windows Phone 7 development, including hosting code, development models, application architecture, selection of development tools, engineering types, and the nature of the system.

     

    Hosting code is your only choice

    For common ISVs and developers, hosting code is the only option. You cannot use C ++ to write programs, or call the existing native DLL or system functions P/invoke. In other words, do not expect to encapsulate some of your code in native DLL and then call it in the hosted code.

    Two development models can be selected

    There are two ways to write managed code: one is to write the Silverlight application and the other is to write the xNa program.

    The Silverlight program here is different from Silverlight in the general sense. Although it is originated from Silverlight 3, it removes some features that are not applicable to mobile devices, at the same time, some Silverlight 4 features or code for mobile devices are added. At the same time, all the Silverlight programs we see in the general concept are in browser; but for Silverlight applications on Windows Phone 7, they are all out browser, that is to say, it runs independently from the browser.

    For xNa programs, it may be a strange thing for most Chinese developers. It is a development tool launched by Microsoft to develop games on Xbox and Zune applications. Unfortunately, since Xbox and Zune have never officially entered China, Chinese development really pays little attention to this aspect. Similarly, it uses managed code. Its development environment is a set of things based on Visual Studio called xNa game studio.

    Windows Phone 7 Application Architecture

    We can see that the bottom layer is. NET Compact framework, which is a core component. On top of this is some common services, such as sensor API, location API, Windows Live SERVICE, network service, multimedia and so on. Another layer on the internet is some of the content that is unique to Silverlight or xNa itself. The top layer is the applications you write based on these two different architectures.

    Selection of development tools

    You can download Windows Phone Developer Tools CTP. It includes Visual Studio 2010 express for Windows Phone CTP, Windows Phone emulator CTP, Silverlight for Windows Phone CTP, and xNa game studio CTP. Specifically, the Express version of Visual Studio 2010 supports the development of Windows Phone, that is, it is purely free. Unlike in the past, we had to purchase Visual Studio to develop Windows Mobile.

    To install this development tool, you need to use the Windows 7 or Vista SP2 operating system and need 3 GB hard disk space. The memory requirement is 2 GB, and a graphics card supporting DirectX 10 is also required.

    If you are a front-end designer and want to study Silverlight carefully, you can download express blend 4 beta, then install expression blend add-in for Windows Phone and expression blend SDK for Windows Phone. you can design Windows Phone 7 Applications in expression blend.

    Engineering type

    After installing the development tool, open Visual Studio 2010 express for Windows Phone. You can select the following project types:

    We will find that in the Silverlight application, we have two options apart from the class library project. One is "Windows Phone application" and the other is "Windows Phone list application ".

    The first project is a very common Silverlight application. The second project is a main interface as a ListBox application, which shows you how to use the list in the interface. However, I believe that most people need to wait for a standard 2D form and the six hubs that are similar to sliding forms. The templates for these two forms are not available in the current CTP version, and you want to see them in the official version.

    As for xNa game studio, there are a variety of projects, including not only Windows Phone game, but also windows game and Xbox 360 game.

    System nature

    Create a common Silverlight application and drag it to a button control. Double-click the button and write the following code in its click event:

    MessageBox. Show (system. environment. version. tostring (), system. environment. osversion. tostring (), messageboxbutton. OK );

    Press F5 to run the program. Visual Studio will automatically call the Windows Phone 7 simulator and deploy and run your program. Click the button in the simulator and the following result is displayed:

    This makes it clear that Windows Phone 7 is actually based on the wince 7 kernel. The managed code running above is. NET Compact framework 3.7.

    Summary

    Windows Phone 7 is a brand new platform that is familiar and unfamiliar to most developers. It is familiar with continuing to use C # for application development. What is strange is that it uses Silverlight and xNa as the development choice. However, in any case, there is still a long time before the official launch of Windows Phone 7, which is enough for us to study and study. We hope that a large number of Windows Phone 7 Applications will appear in front of users on the date of official launch of Windows Phone 7.

    Http://dev.chinamobile.com/news/technologyproduct/2810.html

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.