Install windows phone SDK for Visual Studio and Create simple Windows phone app

             Its a very simple process, now lets get started with configuring  windows phone SDK in Visual studio and start with  basic windows phone programming, I have made use of these softwares.

Visual Studio 2010

Windows SDK 7
Windows Phone

Step 1:

First download and install Visual studio in your machine, which is going to be the IDE for windows phone application development.

Step 2:

 Download windows phone 7 SDK from here. This link will download a file named vm_web.exe, installing this windows phone SDK will further download approx 400 MB file and will automatically configure windows SDK in Visual studio. Once done, just proceed with the next step.

Step 3:

Lets go ahead and verify the installed packages. Now open Visual studio and create a New project, it should contain windows phone templates as listed in the below screenshot.

Now name the project and click OK. You will be able to see similar Solution Explorer.

It will contain many files, among which the code section is present in MainPage.xaml and MainPage.xaml.cs.
MainPage.xaml - Page for UI design - All the UI components of the app will be placed here.
MainPage.xaml.cs - Page for Code behind, this is where the code for UI components will be written. It has to be programmed in C Sharp.
Windows application works on Code-behind  Model. Now lets create a simple windows phone Hello World application in this model.


Drag and drop a TextBlock into <Grid> </Grid> tag, which is the Content panel of the application.

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" DataContext="{Binding}" Background="#FF7B899D">
      <TextBlock  Name="lbl" />


Let me assign a text value to the TextBlock 'lbl' as shown below
 public MainPage()
            lbl.Text = "Helloworld";          

Now RUN the application by clicking run button at the top or by pressing F5 button. The below screen will appear.

If you dont find the application screen, press Windows button in the Emulator !!

            Do you like to add your own tutorials here? Here is an oppurtunity... Check this link ! !            



Post a Comment