O'Reilly logo

Professional Visual Basic 2012 and .NET 4.5 Programming by Todd Herman, Gastón Hillar, David McCarter, Rob Windsor, Billy Hollis, Bill Sheldon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building Windows 8 Style Apps with HTML and JavaScript

In the previous chapter you saw how to build Windows 8 style apps using Visual Basic and XAML. You can also build these kinds of apps using HTML and JavaScript. You'll take a brief look at how to do so by building a sample application similar to the others you've built in this chapter.

The key to building Windows 8 style apps with Web technologies is the Windows Library for JavaScript (WinJS). Not only does it include a set of controls you can use to build the interface for your applications, but it includes functionality that enables us to call services, interact with Windows, and much more. The sample application demonstrates how to use WinJS controls and how to use WinJS to call Web services and to enable data-binding. Note that you'll only be able to build and run the sample application if you are using Windows 8.

Open Visual Studio and select File ⇒ New ⇒ Project. In the New Project dialog, select the Installed ⇒ Templates ⇒ JavaScript ⇒ Windows Store category on the left, then select the Navigation App template, set the Name to MetroDemo, and click the OK button (see Figure 14.56).

Figure 14.56 Creating a Windows 8 style app project

14.56

When the project has been created, expand the pages and home nodes in the Solution Explorer. You should see something similar to Figure 14.57.

Figure 14.57 Files added by the project template ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required