Hi crossxaml,
Thanks for your message and welcome to the forums.
The short name for C#/XAML for HTML5 is CSHTML5 (it's like the website domain: cshtml5.com).
In terms of XAML syntax, namespaces, and features, the closest one is Windows Universal Apps, which is the new Microsoft XAML standard for developing Windows 8/10, Windows Phone 8.1+ and XBox apps. You can see it when under Visual Studio you click File -> New Project -> Store Apps (or Universal Apps) and choose any of the said platforms.
However we are doing our best to be as much compatible as possible with also the other platforms, such as Silverlight (which is very similar to Universal Apps, except for the namespaces), and WPF (which has way more features than the other platforms).
For example, in XAML, we support both ways of referencing XAML namespaces: the new way (xmlns:local="using:MyNamespace") and the old Silverlight/WPF way (xmlns:local="clr-namespace:MyNamespace;assembly=MyAssembly").
As far as C# is concerned:
- The classes are very similar for all those platforms. CSHTML5 supports a small subset (documentation is coming very soon).
- The C# syntax supported by CSHTML5 is C# 5.0, so it includes all the language features you need. It supports even more language features than Silverlight, such as async/await that is not supported in Silverlight 5.
- As far as the namespaces are concerned, we use the namespaces of Universal Apps. People who want to share code with Silverlight or WPF apps can easily do so by placing compiler directives around the namespaces ("#if CSHTML5"). For example:
Code: Select all
#if CSHTML5
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#else
using System.Windows;
using System.Windows.Controls;
#endif
Please feel free to let me know if something is not very clear or if you have any other questions.
Best regards,
JS-Support