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 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.