Creating a Windows Runtime Component

Besides consuming the WinRT APIs from managed code, we can also write our own components that can be used from all supported WinRT languages. For example, using C# or Visual Basic, we could write a WinRT component that’s based on managed code and that can get used to build Windows Store applications no matter what language those are written in.

The idea of providing a component-based model to share assets across different applications isn’t anything new. Both classic COM and the CLR have offered this type of componentization. The use of WinRT components is exclusive to Windows Store application projects, though, and benefits from the interop capabilities using language projections and whatnot. For example, ...

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.