Monday, July 23, 2012

Hello World Program For Windows 8

This tutorial would help you in creating your  Hello World  metrostyle app using C# .

For this you need to have Windows 8 Release Preview and Visual Studio Express RC 2012 or Visual Studio 11 Ultimate Beta . I would be using the latter.

They are available at :-
http://msdn.microsoft.com/en-us/library/windows/apps/hh974577.aspx

1. After you have installed the required softwares and framework, you may run the Visual Studio 11 Beta or  The 2012 Express Version from your desktop.

2. Select File > New > Project

3. In the left pane expand Installed, then expand Visual C#, select Windows Metro Style and select the Blank App (XAML) template. Change the name of the project to HelloWorld.


4. In the right pane under Solution Explorer , you will find BlankPage.xaml . Double click on that. You may be able to see the designer part and below that the code part.

5. As our motive here is to make a simple Hello World app we would need to drag the TextBlock element from the toolbox. 

6. Click the toolbox on the left , scroll down and double click on TextBlock. The TextBlock element might have come in the top left corner of the designer box, drag it to the middle and expand it a bit both horizontally and vertically.

7. Click on the TextBlock and in the bottom right you could see properties of that element. You can clearly see the type is TextBlock and it is unnamed. So we name it as text1.

8. Click on the pane named Common and replace the text field with Hello World.

9. Your local machine is your emulator here. Press F5 to see your app run. If the build and deployment is successful , you would get a view like this :-


Congrats you have successfully made your Hello World metrostyle app. 


No comments:

Post a Comment

 
Tweet