HTML and CSS Reference
In-Depth Information
In the start fragment, you may have buttons and controls through which you control navigation.
You are in no way forced to have hyperlinks. When you navigate away from a page fragment, the
system does all the work that is required to display the new content effectively to the user. At the
same time, the newly displayed page is only responsible for displaying a Back button. The logic to
navigate back is gently offered by the WinJS framework.
Inside the Navigation App template
The first example you build in this chapter is an extension of the sample application you got by
creating your Windows Store application project from the Navigation App template in Microsoft
Visual Studio. Let's then get familiar with the programming model.
Creating a navigation app
You open Visual Studio and create a brand new project using the Navigation App template. You call
this project Gallery , as shown in Figure 7-3.
FIGURE 7-3 Creating a Navigation App project.
The project contains a few more files than the Blank App template that you're used to. The familiar
default.html page plays the role of the main page of Figure 7-2. Companion files default.css and
default.js just provide style sheets and scripts for elements within the main page.
In Figure 7-4, you also notice a brand new pages folder. This is the folder where you will group all
of your fragment pages, each in a separate subfolder. By default, the pages folder has one subfolder
named home ; this is also the name of the only fragment available initially. The home folder contains
home.html, home.css , and home.js . This is a standard pattern: The CSS file contains all style sheets
used by the HTML file and the JS file contains all the required script.
Search WWH ::

Custom Search