Wednesday, February 2, 2011

How to install Window mobile phone development?


Window phone developer tools

·        Visual Studio 2010 Express For windows phone
·        Windows  Phone Emulator Resources
·        Silver Light tools for Visual studio
·        XNA Game Studio 4.0
·        Microsoft Expression Blend for Windows Phone

System Requirements

·        Supported Operating system : Windows 7;Windows Vista

·        Windows® Vista® (x86 and x64) with Service Pack 2 – all editions except Starter Edition

·        Windows 7 (x86 and x64) – all editions except Starter Edition

·        Installation requires 3 GB of free disk space on the system

·        2 GB RAM

·        Windows Phone Emulator requires a DirectX 10 capable graphics card with a WDDM 1.1 driver

Installation and Setup

·        When you install Windows Phone Developer Tools, you install Visual Studio 2010 Express for Windows Phone, Windows Phone Emulator, Expression Blend, XNA Game Studio, samples, and other SDK components.

Using the Visual Studio IDE for Windows Phone Projects

·        In the IDE that are unique to Visual Studio 2010 Express for Windows Phone and to the Visual Studio add-in that is included with Windows Phone Developer Tools.

Using Application Project Templates for Windows Phone

·        Visual Studio 2010 Express for Windows Phone and the Windows Phone Developer Tools add-in for Visual Studio includes project templates created specifically for application development on Windows Phone. After you create a Windows Phone project, you can open the project in Visual Studio or in Expression Blend for Windows Phone.

·        To open a project template, on the File menu, point to NewProject.

 

·        An application template that can be used as a starting point for any project based on Silverlight for Windows Phone. This template provides a simple one-page application that uses Page and Frame elements.

Debugging Windows Phone Applications

·        Visual Studio 2010 Express for Windows Phone and the Windows Phone Developer Tools add-in for Visual Studio include support for debugging Windows Phone applications. Visual Studio 2010 Express for Windows Phone and the add-in support most managed debugging features.

How to: Deploy a Windows Phone Application Using Visual Studio

·        You can use the Device Toolbar to specify either the Windows Phone Emulator or a Windows Phone device as the target for application deployment.

·        The Windows Phone OS 7.0 device must be registered and unlocked. For more information, see How to: Use the Developer Registration Tool for Windows Phone.

·        The device must be connected to the host computer.

·        The Zune client must be installed on the host computer.

·        The Zune client must recognize the connected device. When you connect a Windows Phone device to the host computer, Zune automatically starts. If it does not start, then start Zune manually. Zune must be running and the device must be recognized when deploying to a Windows Phone device.

To select the target device for deployment

·         Select either Windows Phone 7 Emulator or Windows Phone 7 Device on the Device Toolbar.
Device Toolbar

To deploy the application

·         To deploy the application to the selected device, select the Start Debugging (F5) icon in the Device Toolbar or Start without Debugging (Ctrl + F5) from the Debug menu.
·         If the emulator is the target device, it will launch automatically. For more information on starting the emulator, see How to: Start Windows Phone Emulator.
·         If you cannot connect to a Windows Phone OS 7.0 device, verify that you have met the prerequisities described above. Open Zune and verify that the Zune software recognizes your device.

Create Your First Silverlight Application for Windows Phone


Creating a New Project

  • Launch Visual Studio 2010 Express for Windows Phone from the Windows Start menu. If the Registration window appears, you can register or temporarily dismiss it.
  • Create a new project by selecting the File | New Project menu command.
  • The New Project window will be displayed. Expand the Visual C# templates, and then select the Silverlight for Windows Phone templates.
  • Select the Windows Phone Application template. Fill in the project Name as desired.
·        Click OK. A new project will be created and MainPage.xaml will be opened in the Visual Studio designer window.



Adding Controls



To add the controls of the application

Rename the application window title. Right-click the MY APPLICATION text in the Visual Studio designer and select Properties. The Properties window appears in the lower right hand corner.




  • In the Text property, change the name to My First Application.

  • Add support for both portrait and landscape orientations. Click the first line of the XAML code so that the PhoneApplicationPage properties are displayed in the Properties windows. Change the SupportedOrientation property to PortraitOrLandscape.

  • Open the Toolbox in Visual Studio, if it is not already open, by selecting the View | Other Windows | Toolbox menu command.

From the Windows Phone Controls, add a TextBox control to the designer surface by dragging and dropping from the Toolbox onto the designer surface. Place the TextBox just below the Mini Browser text. Use the mouse to size the control to the approximate width shown in the layout image above. You can leave the default name of the textbox as textBox1 in the Properties window. Change the Text property of textBox1 to http://www.xbox.com.
Set the Height and Width properties to Auto by typing the word Auto in the property value. Set the HorizontalAlignment property to Stretch. Set the Vertical Alignment property to Top. These properties will allow the control to size and position itself correctly in both Portrait and Landscape modes. Use the mouse to reposition your control relative to the margin so there is room for the Go button.
Add a WebBrowser Control for Windows Phone to your application by dragging and dropping it from the Toolbox. Place it below the two controls you added in the previous steps. The control will be named webBrowser1 by default. For more information about the Web Browser Control, see WebBrowser Control Overview for Windows Phone and WebBrowser Control Security Best Practices for Windows Phone.
Size the control to fill the remaining space.
Set the Height and Width properties to Auto. Set the Horizontal Alignment and Vertical Alignment properties to Stretch. These properties will allow the control to size and position itself correctly in both Portrait and Landscape modes.
Your layout should now be complete. In the XAML code in MainPage .xaml, look for the grid containing your controls. . If a Height or Width property of a control is not in the XAML, it will default to Auto.
Adding Code

 This step will add the code to implement the Go button.


Building and Debugging the Application

The application is now complete. This step will let you build, run, and debug the application.

To build and debug the application

1.      Build the solution by selecting the Debug | Build Solution menu command. The project should build without any errors in the Error List window. You can open the Error List window, if it is not already open, by selecting the View | Other Windows | Error List menu command. If there are errors, review the steps above, correct any errors, and then build the solution again.
2.      Run the application by selecting the Debug | Start Debugging menu command. This will open the emulator window and launch the application. Make sure that your desktop computer has Internet access. Then you can test your application by clicking on the Go button and verifying that the browser window navigates to the given web site. Press one of the rotation controls on the emulator: 






The emulator will rotate into Landscape mode. The controls will resize themselves to fit the Landscape screen format.










 


No comments:

Post a Comment