Adding New Page Controls to a Navigation App

A single page app that contained only a single Page control—the home page—would not be worth the effort. So let me show you how to add a second page.

The easiest way to add a new Page control to your project is to take advantage of the Visual Studio Page Control item template. Create a new subfolder named anotherPage located at pages\anotherPage. Select the menu item Project, Add New Item, and select the Page Control template (see Figure 12.4). Name your new Page control with the name anotherPage.html.

Image

FIGURE 12.4 Creating a new Page control with Visual Studio

When you add a Page control named anotherPage.html ...

Get Windows® 8.1 Apps with HTML5 and JavaScript Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.