The Universal Project Types

There are four different Universal app project templates that ship with Visual Studio 2015: Blank App, Hub App, Class Library, and Windows RunTime Component.

The Blank App is self-explanatory. It creates blank phone and Windows pages for you without any predefined layout or control set. The Hub App is used to create multilevel hub-type user experiences where multiple items can be grouped in different ways, and drilling down on an item will allow you to view the item detail. This is similar to the approach we adopted with the XAML Image Viewer app. Class Library is also self- explanatory; it is meant for creating a standard .dll/class library with no UI components.

Finally, the Windows Runtime Component template allows you to create components that can be reused across C++ and HTML/JavaScript in addition to the managed frameworks.

For our purposes, the Hub app comes closest to our design intent, but it is also overkill. We’ll start with the Blank App template. With Visual Studio open, select New Project, and then select the Universal App category. Then select the Blank App template from the list, name the project, and click OK (see Figure 24.12).

Image

FIGURE 24.12 The Universal app templates.

When Visual Studio is done processing the template, you should have a single solution with three different projects: a Windows 8.1 project for our Windows UI, a Windows Phone 8.1 project for our phone UI, and a “shared” project that will contain as much logic (and XAML) as possible for sharing between the two target platforms (see Figure 24.13).

Image

FIGURE 24.13 The Universal app solution and projects.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset