Results 1 to 6 of 6

Thread: How to develop application for Windows Phone 7

  1. #1
    Join Date
    Sep 2010
    Posts
    48

    How to develop application for Windows Phone 7

    Leaving comments on the market and existing competitors to anyone involved in marketing and strategy, this article will try to figure out how to install and use the SDK currently available (and free) to build together the first Windows application Phone 7. Before you begin, it is worth repeating two basic information:
    • Phone Windows 7 is, for developers .NET, the natural continuation of a process of evolution of development tools, a trend that those who develop mobile applications, wait for some time.
    • The new mobile phone (pejorative term) allows the creation of user interfaces using XAML, the declarative language familiar to those who develop applications with Windows Presentation Foundation or Silverlight.
    This continuity is ensured by the presence of the Silverlight runtime on board devices for running applications, the version used is 3 with some features that appeared in version 4. In practice, those who write Windows applications or Web since 2006 has had the opportunity to use XAML and you will find a home in the DEFINITION of the user interface. Who arrives from the classic mobile development, made with Windows Forms and SQL CE, you will find a new opportunity and an apparent "lack" On the one hand we use a more sophisticated language for defining user interface, on the other feel the lack of SQL CE, which in this first version is already on the device, but can not be used directly by our applications.

  2. #2
    Join Date
    Sep 2010
    Posts
    48

    Re: How to develop application for Windows Phone 7

    Another new feature is the ability to use XNA Game Studio 4.0: XNA is a technology aimed primarily at those who produce games, but should not be underestimated to create complex animations or interact with some features of the device, you can create applications "mixed" Silverlight and XNA to get the best of both platforms. Having said this we begin to develop our first application, starting from the installation of development tools to deploy and test the emulator. There is no need to use a physical device, nor knowledge is required before mobile development environment.

    Installing the SDK

    Let's start step by step, to build the application since the installation of the SDK to get to the first application, simple but practical, to try the emulator. The first thing to do is download the SDK, better known as Windows Developer Tools Phone. The current version provides Visual Studio 2010 Express CTP for Windows Phone, an emulator, still in CTP, for performing the tests, Silverlight CTP Phone for Windows or the Silverlight runtime and adapted to the new device, as we have way to indicate in the preface, XNA Game Studio. To install the SDK we have already installed the .NET Framework 4.0 and .NET Framework 4.0 Client Profile. All this does not require an already-installed version of Visual Studio 2010: setup of only 3.2 MB, then download the necessary components in the process. If the version of Visual Studio 2010 is already on your system, find the new template design alongside the existing templates: We advise you to use Visual Studio 2010 Express Phone for Windows development as we will have a better interaction with the emulator.

  3. #3
    Join Date
    Sep 2010
    Posts
    48

    Re: How to develop application for Windows Phone 7

    Once installed the tools, you can proceed to create the first draft. This CTP provides the ability to create applications for the two types of runtime, Silverlight and XNA. For each type of environment, we will then make the classic choice about the type of project. The environment Silverlight provides the following template:
    • Windows Phone Application - It is the template you choose for including the definition of application and a first screen free from constraints on the design.
    • Windows Application Phone List - This alternative can help you create a user interface that presents itself as a list of options on the main screen with the ability to choose an item to see details.
    • Windows Class Library Phone - creates the classic form of a library dll referencing projects.
    The first thing to note is the presence of a Page by default instead of the classic Windows or if you come from .NET Framework, Windows Forms Applications on Windows 7 Phone has been based on the concept, already present in both WPF Silverlight Navigation Any "mask" is a page that makes up the flow with which the user moves on itself. The box design shows the interface of the phone where it is the Back button (the first in the bottom left), through which you can go back a step. The second thing to note is the presence of a title and a subtitle in the page immediately change this information to provide the application name and the company produces: To do this you can do it from the property or directly in the XAML, this procedure is obvious for those who work with WPF or Silverlight, but it is definitely for those coming from Windows Forms.

  4. #4
    Join Date
    Sep 2010
    Posts
    48

    Re: How to develop application for Windows Phone 7


    Before adding the controls, let's look at the current code: the template project is proposing to manage the information within a Grid composed of two lines (RowDefinition), the first of which houses the two TextBlock we just changed the title, while the second contains the actual content of the page (ContentGrid for now rightly empty). Note how every element of the user interface to refer to its style through an external resource (expression StaticResource): These resources are defined in the file App.xaml within our application along with two images that represent the icon for the application itself and the background. Once again, those who work with WPF / Silverlight should be used to centralize the styles, as well as those working on the web can make a parallel with CSS (cascading style sheets). For those coming from the mobile above is enough to think about how we structure the code to understand the benefit of centralizing resources in the styles: "Never write the same line of code in two places," is the rule that we follow as developers. By designing the user interface, the rule is equally valid: "we have made the font, its size and color of title in an external resource will modify it so that when we act on any video element points that resource".

  5. #5
    Join Date
    Sep 2010
    Posts
    48

    Re: How to develop application for Windows Phone 7

    Create the User Interface

    Add a TextBox and note that during its positioning is still on the sidelines as defined in the grid that contains it (ContentGrid). We shall return to later layout and positioning: now it is good to note, however, as operations on the designer to match elements of the XAML in our case, it is used and modified Margin attribute when you drag a control on the designer surface. We put a Button and a TextBlock (is the same as a Label , for those coming from Windows Forms or Web Forms) and then create the code, press the button, fill the TextBlock with the contents of the TextBox : the example as mentioned at the beginning, is deliberately very simple to familiarize yourself with the tools.

    Without any fine or graphic as the merits of aligning resources to define the controls, or style, let's create the code in the code behind to respond to pressing by the user. Taking the classic double-click the Button control to obtain the creation of the event handler for the event Click on Button1 , and no need to do detailed analysis. After compilation, Visual Studio 2010 Express for Windows Phone start the emulator and spent a few seconds of initialization is our application: Visual Studio is concerned to make it even deploy the application and to perform. Simply enter in TextBox so that it appears the SIP (Software Input Panel) on the emulator you can use the SIP or rely on the physical keyboard of the PC to speed things up. To test the effectiveness of our code we can of course press the Button to get the value "Ciao a tutti" in TextBlock , but before doing so, or if I am communicating it to you too late, even after you have already made, back in Visual Studio we try to put a break point in the code. Visual Studio supports debugging of code that runs on the emulator (if you work in a mobile environment is accustomed to this feature).

  6. #6
    Join Date
    Sep 2010
    Posts
    48

    Re: How to develop application for Windows Phone 7

    The first argument is more than anything else, a consideration: whether or not every application can support screen rotation, not all applications it must rotate the orientation of the device. An example is a game where it is important to define a rectangular area with top-down oriented movement upward (for the nostalgic game might be 80 years or Penguin 1942), or an application that uses the accelerometer to perform other operations. The most classic example is "teeter" available on any phone, is to run the ball to a location "obstacle" to arrive at the final hole, to move the ball you must guide / fold the phone in different positions; think about what would happen if the movement to the right, in addition to moving the ball on the right screen to rotate. In a Silverlight application, you can tell the kind of guidance system supported: The template of Visual Studio 2010 Express for Windows Phone us now proposes to set the support directly into the constructor of a page: the level is set on the page, not in the because, rightly, every page of an application might support or not the rotation.

    The second issue to consider is the support for the video resolution as well as screen rotation: it is outside the scope of this article highlight the techniques and how to create resolution-independent user interface, but it is essential to take account in this environment. The emulator can be used to make multiple debug sessions, even of different applications: no need to close the emulator for each correction operation of the code: it is enough, indeed recommended, stopping the application from Visual Studio, leaving the emulator open, correct the code and deploy a repetition through F5. Keep open the emulator saves us a lot of time because every time you restart the emulator should load and initialize a long list of features, including the ability to attach to the PC that hosts it to surf the net.

Similar Threads

  1. which language is used to develop a meego based application
    By Ray Brown in forum Portable Devices
    Replies: 3
    Last Post: 01-02-2011, 11:40 AM
  2. How to develop sample application in meego IVI
    By HatRix in forum Software Development
    Replies: 4
    Last Post: 31-01-2011, 07:53 PM
  3. develop a application in android
    By insanefella in forum Software Development
    Replies: 4
    Last Post: 27-12-2010, 08:20 PM
  4. How to develop java application for Blackberry device
    By Shanbaag in forum Software Development
    Replies: 3
    Last Post: 10-08-2009, 12:40 PM
  5. Want to develop an application with hide css display property
    By Bantu in forum Software Development
    Replies: 3
    Last Post: 04-08-2009, 01:14 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,726,993,435.72887 seconds with 16 queries