How to develop Application in Windows 8

How to develop Application in Windows 8

Developing application for Windows 8 is very simple. We can create our own app for our system. To develop application for window 8 we need few packages. Before we kick-start we must load our system with windows 8 release version and visual studio 2012 express for windows 8. We can download vs2012 in the Microsoft site itself. After installing the packages, your system is ready to develop application for Windows 8.

The start up screen on vs 2012 appears to be like the above image. Click new project to start building our application. In the middle pane you can see number of options available. By clicking the links available we can take the steps and ticks in creating an application.

By clicking the new project you will be see a new window with number of options.

Left side you will find the number of options like templates.

If you click templates you will get the options like java script, html, and vb and c #.

Vs 20102 is the wonderful software, which is the cross platform, we can create our app in the language we know we can choose the respective template to start building

By choosing any of the language you can choose your templates, depend on the idea you have or based on your app requirement you can choose your own template.

Blank app- this type of template have no predefined controls, it’s just a blank app.

Grid app- this kind of templates used to create metro style app where it has group of pages and it can be navigated among them.

Split app –it is a two page metro app style that navigates among the group of items listed and the first one allows the user to select the grouped item and the second one displays it.

Class library – it creates the library function for metro apps.

Unit test library- it has a project that has unit test, it is used to test the metro style apps.

Now depend on the requirement choose the template.

We can start by hello world app using java script.

Click new project name as hello world

Name the project as hello world and give ok. It ll open you the window with the model windows 8 app screen.

It shows the control of your application. in the middle blank pane we can create a text box , block and the button to display hello world on button click

Code  for the start page is.

 <!DOCTYPE html>

<html>

<head>

<meta charset=”utf-8″ />

<title>HelloWorld</title>

<!– WinJS references –>

<link href=”//Microsoft.WinJS.1.0/css/ui-dark.css” rel=”stylesheet” />

<script src=”//Microsoft.WinJS.1.0/js/base.js”></script>

<script src=”//Microsoft.WinJS.1.0/js/ui.js”></script>

<!– HelloWorld references –>

<link href=”/css/default.css” rel=”stylesheet” />

<script src=”/js/default.js”></script>

</head>

<body>

<p>Content goes here</p>

</body>

</html>

Hello will be displayed along with the name when the button is clicked. So double click the button, it will navigate you to the code page and you can code the content to your need.

Code for content is.

 <body>
    <h1>Hello, world!</h1>
    <p>What's your name?</p>
    <input id="nameInput" type="text" />
    <button id="helloButton">Say "Hello"</button>
    <div id="greetingOutput"></div>
</body>

In order to display the user name along with the greeting.

    function buttonClickHandler(eventInfo) {
        var userName = document.getElementById("nameInput").value;
        var greetingString = "Hello, " + userName + "!";
        document.getElementById("greetingOutput").innerText = greetingString;

Here we have created our first Windows 8 Application. Soon we will meet with the other variety of App.

1 thought on “How to develop Application in Windows 8”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.