Creating Your First Windows Store 8.1 Hello World App

In this article we will see how to create a simple “Hello World” Windows Store 8.1 app. To create a Windows Store 8.1 app we need Windows 8.1 and Visual Studio 2013.

Step 1

Launch Visual Studio 2013, the Start Screen is as shown in the screen below.

Visual Studio 2013

Step 2

Select "File" -> "New" -> "Project..." or select New Project in the Start Screen. The new project dialog appears. Select Windows Store in the left pane of the dialog then select Blank App template as shown in the screen below.

new app

Provide a proper project name; here I used “Hello World Demo”.

Step 3

Click OK to create the project. Now your project looks as shown in the following screen.

windows app

Step 4

Now drag and drop one button control from the toolbox to show a message dialog as “Welcome to Hello World Demo”. Change the button content to Start. After completing, the design part looks as in the following screen.

Hello World Demo

Step 5

Now go to the coding part. Simply double-click the “Start” button and it will automatically create the event handler and it goes to the coding page that looks like the following screen.

master page

Step 6

Now write the following code to show the message dialog as “Welcome to Hello World Demo”.

C# Code

To show the message dialog include the namespace given below:

  1. using Windows.UI.Popups;   

  2. MessageDialog objMessage = new MessageDialog("Welcome to Hello World Demo");  

  3. await objMessage.ShowAsync();  
The full code page looks like the following screen.

code page

Step 7

Run the Windows 8.1 Store app.

For running your Windows app you need to deploy your apps to one of the three options, local machine, remote machine and simulator. In this article I am using simulator.

select simulator

Now build and run the application by pressing the F5 key directly in your keyboard. Press the Start button and you will see the output as shown below.

start


Similar Articles