Overview: To develop application over a Windows Phone platform, we have two popular and modern options: Silverlight and XNA.

Silverlight is known to enable web developers to create stunning interfaces with the combination of controls, text, vector graphic, media, animation, and data binding that can run on a number of platforms and browsers.

Meanwhile XNA is a gaming platform that supports 2D and 3D games meant for Xbox 360, console, and PC.

Silverlight and Window Phone: In developing a Windows Phone application, we can select one of the two options, which are Silverlight and XNA

Below I have shared some useful points regarding Silverlight with Window phone

Applications using Silverlight in Windows Phone fully apply navigation techniques in Silverlight 3. Using the frame container, navigation can naturally be easy to handle, and the navigation to go back is integrated to the button on the hardware

Visual Studio and Window Phone Development : In the template provided for application development using the Silverlight platform, there are five types of project we can choose, depending on what we need.

Window phone 7

Window Phone project and default files: By Default, a project will consist of these files:

Window phone 7 with Silverlight

Window Phone Application Life Cycle: Model execution on a Windows Phone has a complete cycle, from when the application is launched until it is deactivated. This execution model is designed to provide a fast, responsive experience at all times. This causes the Windows Phone to only be able to run one application at a time. This is to prevent the device from being slow or unresponsive due to the existence of background applications.

Below are some important terms to understand

Now till now I have discussed about important State in Window phone application, now it's time to look into Life Cycle in window Phone.

Below I am discussing about Life Cycle in ascending order.

Points to remember:

We can use below namespaces for applying security code inside the application.

System requirement for developing Window Phone application: To begin development and learn how to build Windows Phone applications, we need Windows Phone Developer Tools set. It includes Visual Studio 2010 Express for Windows Phone, Windows Phone Emulator, XNA Game Studio, and Expression Blend for Windows Phone.

  1. Operating System: Windows 7 and Windows Vista

    --Windows Vista (x86 and x64) ENU Service Pack 2 all editions other than Starter
    --Windows 7 (x86 and x64) ENU – all editions other than Starter
  2. Hard disk with a minimum 3GB free space
  3. Recommend 2 GB of memory
  4. Graphic card that supports DirectX 10 with WDDM 1.1 driver

If we have already installed Visual Studio Professional or later versions, an additional Add-In for Visual Studio will automatically be installed. It can be obtained from this link.

So now we got the idea about window phone application development so we can start our Hello India Project.

Step 1 : Open Visual Studio Express for Windows Phone. Select File -> New Project. Choose the Visual C# Silverlight for Windows Phone template. Select Windows Phone Application and name the project to our liking.

Silverlight development

Step 2 : After the project is created, the screen will show design and XAML markup codes. Design view shows the phone interface which enables us to see how our program looks like during the development. For those of us who are already familiar with Visual Studio, then the Tool Box panel, Solution Explorer, and Properties pane will be around our main view.

Silverlight with Window phone

Step 3 : Add a TextBox and a Button from the ToolBox. Note that we get the same experience in developing Silverlight for web applications. We can easily alter the interface from the Properties pane.

 Silverlight in windows phone 7

When a Button is selected, we can see that the button is highlighted with a box outside the Button's border. The box indicates the Button's touch area. This property is owned by every control. Change the title text in XAML into "Hello India".

Step 4 : Double-clicking the Button will show codes behind the active page. Add a function to change Title into "Hello +" input from available TextBox.

Window7

Step5 : Type this code for the Button's event handler.

private void button1_Click(object sender, RoutedEventArgs e)
{
this.PageTitle.Text = "Hello" + textBox1.Text;
}


Step 6 : Now we can test the simple application we have made. To deploy and launch the application we can choose between running in an emulator or available Windows Phone device. Since there are not many deployable Windows Phone yet, let's use the emulator to run this simple application. Press F5 and see the result.

Silverlight in windpws phone 7

First-time deployment may take some time to process. However, the next deployments will take less time, provided we don't shut down the emulator. Type any text in the TextBox and press the button. The title in the page will change according to the text inserted into TextBox.

Hurray this is our first Window Phone Application.

Window phone 7

Tune for hour 2 tutorial

Thanks for Reading.