Windows-8.1

How to create your first Windows Phone app

Getting started with app development is the toughest part. There are chances that you may not find the right resources or end up getting struck on the most basic things. Sometimes tutorials don’t cover what they feel is obvious. We will be assuming in each of our articles that this topic is completely new for you. That way experienced developers could skip some steps while beginners won’t miss out the basics.

1. First of all create a new blank project and name it myfirstapp.

 

 

2. Then the following screen appears before you.

 


 

3. Then change the name of the application from my application to myfirstapp and page name to first page in Xaml code as shown below.

 


 

4. Then drag a Button control and Textblock control from the toolbox given on left hand side.

 


 

5. After that the following screen appears before you.

 


 

6. Now give a name to the Textblock that is myblock in xaml window.

 


 

Code:

<Grid x:Name=”ContentPanel” Grid.Row=”1″ Margin=”12,0,12,0″>

<TextBlock x:Name=”myblock” HorizontalAlignment=”Left” Margin=”111,56,0,0″ TextWrapping=”Wrap” Text=”TextBlock” VerticalAlignment=”Top” Height=”48″ Width=”230″/>

<Button Content=”Button” HorizontalAlignment=”Left” Margin=”127,367,0,0″ VerticalAlignment=”Top” Width=”201″/>

</Grid>

 

7. Now double click on the button you created. The following screen will appear before you.

 


 

8. Add the following code in the Button_Click_1 event handler function.

 

Code:

myblock.Text = “Hello world”;

 

9. Now the page will have the following view.

 


 

10. Now click on the Emulator option given in the header menu.

 


 

11. If the emulator is not starting you can choose any other option from the list.

 


 

12. After the emulator has started and you can click on the button in your app.

 

11

 

13. You will see that the text of textblock has changed to Hello world.

 

12

 

14. You have successfully created your first application. You can get the project zip from the link below.

 

Download full project

Chetan Gulati

Currently am doing B TECH in IT from Delhi Technological University. App development is my passion. Believe in quality rather than quantity.

  • kotlasaicharanreddy

    I m new to visual studio I cant see any tools in my toolbox how to add them?

  • Md. Sydur Rahman

    There is nothing about IDE in basic part. This is really important for new users…

    • Yes we will try and add a tutorial on getting familiar with Visual Studio

      • Md. Sydur Rahman

        Thank you very much. I have installed visual studio 13 but there is no template for windows phone apps development.

Read more:
How to change the App name and Tile name of your Windows phone app
Data binding in Windows Phone app – One way binding
How to integrate Google Analytics to Windows Phone app
Close