We are pleased to inform you that the Beta 7.2 of CSHTML5 is available for download!
The main advantages over the previous interop methods are:
- It works both in the Simulator and in the output generated HTML/JS code!
- It works under VS 2012, VS 2013, and VS 2015
Sample code and Extensions download:
We are working on the documentation for this feature. In the meantime, you can see it in action and learn how to use it by checking out following open-source extensions:
Contribute by Creating Extensions:
If you would like to be part of this, please do create new extensions or contribute to existing ones. There are plenty of ideas to choose from, ranging from creating wrappers around popular open-source JS libraries (such as the amazing 3d engine "Three.js", great charting controls "Chart.js", iOS/Android hardware interop library "Cordova", native PDF reader "pdf.js", and so many more) to creating wrappers around commercial components such as Telerik Kendo UI, Infragistics, Syncfusion, ComponentOne, DevExpress, and many more, to implementing features requested on UserVoice such as SignalR. No matter whether you want to create an open-source, closed-source, or commercial extension, we will do our best to assist you as much as we can. To create an extension for CSHTML5, just create a new CSHTML5 Class Library, and share it You can share it for example on the new Extensions section of the forums to get feedback from the CSHTML5 community.
Notes and limitations:
- You cannot use the "dynamic" keyword because JSIL has issues related to CallSites under the VS 2015 Roslyn compiler.
Other New Features and bug fixes of this release:
- New "Run from Localhost" option in the Simulator!
It lets you test features such as Storage, Geolocalization, httpcalls, and other features that, on some browsers, are disabled when running from the "file:///" protocol.
- New CSHTML5.Interop.GetDiv(frameworkElement) method to get the HTML DOM element that corresponds to the specified FrameworkElement
- Fixed broken <WrapPanel/> control
- Fixed "Type not found" compiler issue when using custom controls in XAML
- Improved rendering of <Path/>, <Ellipse/>, <Rectangle/>, and <Line/> controls
- Fixed issue where the <Path/> control didn't render properly if its properties were set after the control was added to the visual tree
- Fixed issue where referencing 3rd party libraries could cause a compilation error saying that the compiler was unable to locate "CSharpXamlForHtml5.dll"
- Added "Application.Current.RootVisual" (alias of Window.Current.Content")
- Added attributes to tell the minimum CSHTML5 version that the extension supports (useful for future backward compatibility with extensions)
Notes about installation:
- Before installing the update, it is recommended that you close all the open instances of Visual Studio.
- If for some reason you need to revert to the previous Beta, simply uninstall this one (from the Control Panel) and reinstall the previous Beta.
We hope you will enjoy this build.
If you find any issues, please post them on the forums or send an email to email@example.com