Using Windows Runtime Components

Using our WinRT component is quite straightforward, simply by adding a cross-project reference to our solution. For example, when we want to build our Windows Store application’s user interface using JavaScript and HTML5, but using managed code for the business logic and data access layers, we can use a WinRT component to bridge the two worlds. This is shown in Figure 32.23.

Image

FIGURE 32.23 Referencing our WinRT component project.

Once we add a cross-project reference, the IntelliSense in the JavaScript project lights up and knows about our public types and their members, as shown in Figure 32.24. This great developer ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.