Pages

Tuesday 31 July 2012

Extending WinRT: how to avoid constrains and expose C# objects hierarchy from WinMD library

Windows 8 programming model allows extending WinRT by implementing WinRT components. These components can be created by using any supported language (JS, C#, VB, C++) and can be consumed by all these languages as well.

Visual Studio provides WinRT library project template, thus creation of your first WinRT component is matter of seconds. Gradually, you will find that your code should follow some rules to stay compatible with WinRT. Most of these rules are not deal breaker, but sometimes they can make you scratch your head a bit.

For example, one of the rules for C# states that all public classes (except XAML controls) must be sealed and custom WinRT-enabled class cannot be inherited from another custom WinRT class. But what can be done to expose a complex hierarchy of objects via WinRT?

Read full article here

No comments:

Post a Comment

Web Informer Button