Community

Company

C#/XAML for HTML5 enters Release Candidate!

We are very happy to announce that CSHTML5 is being released as Release Candidate today.

Here's a quick reminder for those of you who might be discovering our tool:

CSHTML5 is a Visual Studio extension developed by Userware. It allows .NET developers to write web apps in C# and XAML, compiling the files to HTML5 and Javascript.

We have quite a few surprises for you to celebrate the Release Candidate with us. But first, let's take a look back at why we developed C#/XAML for HTML5 in the first place.

The first time I walked into the office, I had a long discussion with Giovanni Albani, our CEO. As a non-tech guy I wanted to know what was the purpose of our extension, and where did the idea came from.

He told me CSHTML5 was a way for .NET developers, who used languages they spent years to learn and master, to create applications that run in a browser. We talked about the end of support for Silverlight, and how it prevented in some ways C# and XAML devs to create web content now that they had to learn HTML5 and JavaScript.
"We wanted to use our knowledge and expertise in C# and XAML to port or create web applications." These were his exact words.

C#/XAML for HTML5 comes from the desire of a group of devs who wanted to go beyond the limit they were facing.

Over time we received the support of other devs and companies who were interested in our tool. It's been almost four years now since we started developing our extension, and today is a pretty big milestone for us.
As a Release Candidate, CSHTML5 already provides Silverlight and UWP-style development pleasure, a fairly wide range of features in C#, XAML and .NET, and has already made the migration of Silverlight applications to the web possible for several companies.

We plan to provide better performance and more third-party components integration over 2018, and we hope the community behind our tool will grow so we can share ways to use C# and XAML to make even more apps run in browsers!

Thank you for supporting us so far, now let's see what surprises we have for you.

- First, we created a 3 minute video to present CSHTML5:

- Second, we are happy to announce that we launched a revamp of our website! It will take place over time, but we're working hard to offer you a better user experience.

That's it for now, we hope you like the Release Candidate.

Killian Leclercq,Media Relations

Changelog (new features since Beta 13):

Added support forApplication.GetResourceStream(uri) and Application.GetResourceString(uri)to read local project filesof type TXT, XML, JSON, and .CONFIG. You can pass a URI formatted with one of the two
following format: "ms-appx:///AssemblyName/Folder/FileName" or "/AssemblyName;component/Folder/FileName"

Support forcustom markup extensions

Support forgoing full-screenvia the "Application.Current.Host.Content.IsFullScreen" property

Ability tointegrate a CSHTML5 application in an existing HTML5 app or ASP.NET, with ability to create multiple XAML visual trees and bind them to specific DIVs in the HTML page. For more information, please read the page "How
to integrate CSHTML5 in an existing HTML5 application or ASP.NET" (the page contains a downloadable sample project for Visual Studio)

Added"WebView" control(named"WebBrowser" in SL-migration projects) that lets you load an HTML URL inside a XAML control in your CSHTML5 application. You can load a page either from an external website
or from a local HTML file located in your CSHTML5 project. Internally, it generates an HTML iFrame. Please note that some websites such as "github.com" explicitely forbid embedding their website into an iFrame. If you don't see your page, please look for error messages in the browser JavaScript Console window.

"WebView.NavigateToString(text)" to directly load an HTML string into an iFrame.

Added initial support forViewbox(works best when viewbox size is constrained by parent or by its own size in pixels)

ImprovedDataContractSerializer: added support for theserialization of Dictionaries and structs (such as KeyValuePair), improved namespaces in the generated XML, improved serialization of byte and float, and more

Improved WCF: youno longer need to specify the endpoint programmatically! The endpoint is now automatically read from the file "app.config".

Improved design-time performance when saving a XAML fileand during compilation

Added"Browse..." button in the Silverlight Migration Wizardto choose a project that is not listed. This is useful to manually select a Silverlight project to migrate when using VS 2017, because VS 2017 is unable to load projects of type Silverlight.

Fixed an issue where, in SL Migration projects, setting 2 dependency properties or attached properties with the same name threw an exception (in Silverlight it doesn't).

Fixed support fordirect text content in attached properties(such as <Border><ToolTipService.ToolTip>Test</ToolTipService.ToolTip></Border>)

Fixed ability to specifyrelative URIs in XAMLfor controls other than <Image>, such as <MediaElement> and <WebView>.

Fixed exception whenbinding a Color to a Brush(such as when binding DropShadowEffect.Color to Border.Background)

WrapPanelno longer crops content by default (unless "ClipToBounds" is set to "True")

Fixed issue with defining markup extensions in referenced projects

Improved accuracy of the XAML Visual Tree Inspector when the window is resized

Improved reliability of the TextBox control

Fixed an issue with WCF that sometimes caused an error 500 message when running in the Simulator

Fixed an issue where "ToggleButton.Checked" event was raised even though the control was already checked

New CSHTML5 logo

New "XMLHttpRequest" class that mimics the JS one (located in the namespace "CSHTML5.Native.JavaScript.Networking")

Added support for passing "null" values to "Interop.ExecuteJavaScript"

Added ability for the Simulator to open URL links in new browser windows

Improved error reporting in the Simulator when using "Interop.ExecuteJavaScript"

Improved Simulator reliability

Fixed REST showcase demo when running in the browser

Fixed JS error "Number Expected" under IE

Fixed several issues with the "Frame" control and navigation

Fixed the error "untranslatable method XmlSerializer.Deserialize"

Fixed Error 500 when calling WCF from the Simulator

Added BindingOperations.SetBinding as an alternative way to programmatically set a binding

Added support for the methods marked with the attributes "OnSerializing", "OnSerialized", "OnDeserializing", and "OnDeserialized" (which get called by the DataContractSerializer)

Added more useful information to the exception that is raised in case of WCF server error when running in the Simulator

Contacting Us

For any bug report or trouble related to the new version of CSHTML5, please contact us at: support@cshtml5.comFor any thought regarding this post, please use killian@cshtml5.com. Journalists or bloggers, if you're thinking about writing on CSHTML5, please contact me to get access to our pressroom.