NEW!
CSHTML5 has now become OpenSilver!

We are happy to announce that CSHTML5 has been significantly improved and rebranded to 'OpenSilver', which stands for 'Open-source reimplementation of Silverlight'. It is fully backward compatible and it can be downloaded from OpenSilver.net. Upgrading from CSHTML5 to OpenSilver is very easy.
Read the FAQ

C#/XAML for HTML5 enters Release Candidate!

Paris - Feb 26, 2018

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 for Application.GetResourceStream(uri) and Application.GetResourceString(uri) to read local project files of 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 for custom markup extensions
  • Support for going full-screen via the "Application.Current.Host.Content.IsFullScreen" property
  • 10X Simulator performance improvement!
  • Support for UriMapper, UriMapping, and Frame! Frame.Navigate(XAML_uri), Source, GoBack, GoForward, CanGoBack, CanGoForward and Navigated event.
  • Ability to integrate 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 for Viewbox (works best when viewbox size is constrained by parent or by its own size in pixels)
  • Improved DataContractSerializer: added support for the serialization of Dictionaries and structs (such as KeyValuePair), improved namespaces in the generated XML, improved serialization of byte and float, and more
  • Improved WCF: you no 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 file and during compilation
  • DateTime.op_Addition and Subtraction
  • List<T>.GetRange
  • Assembly.GetTypes
  • Assembly.FullName
  • Char.ToLowerInvariant
  • Char.ToUpperInvariant
  • ConstructorInfo.op_Equality and Inequality
  • Dictionary.ContainsValue
  • More FieldInfo, PropertyInfo and MemberInfo members: DeclaringType, IsSpecialName, Name, IsPublic, IsStatic, GetCustomAttributes, MethodBase.IsStatic, MemberInfo.op_Equality and Inequality
  • IList.Contains
  • "Version" class
  • Added IE 10 to the list of supported browsers
  • Added "Browse..." button in the Silverlight Migration Wizard to 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.
  • Added support for DataMember.Name, DataMember.EmitDefaultValue, DataMember.Order, DataMember.IsRequired.
  • Added support for the [KnownTypes(methodName)] attribute where the user passes the name of the static method to retrieve the known types.
  • Added support for "CollectionDataContractAttribute" and custom collections (the DataContractSerializer now searches for a method named "Add")
  • Byte.Parse and Byte.TryParse
  • "Lazy2<T>" class that provides the same features as the unavailable "Lazy<T>" class
  • Improved reporting of unhandled exceptions in the Simulator when the debugger is not attached.
  • Support for the "[Serializable2]" attribute (will later be renamed to "[Serializable]" when stable)
  • IndexOutOfRangeException
  • SerializationException
  • Fixed serialization of nested classes
  • Fixed VerticalAlignment="Stretch" for elements inside an horizontal StackPanel.
  • Fixed inability to specify color components in XAML, such as: <Color R="140" G="80" B="80" A="255"/>
  • Fixed string.IndexOfAny(char[] chars, int startIndex)
  • Fixed Linq implementation of Min/Max when no Selector is provided.
  • Fixed license verification when using WCF
  • 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 for direct text content in attached properties (such as <Border><ToolTipService.ToolTip>Test</ToolTipService.ToolTip></Border>)
  • Fixed ability to specify relative URIs in XAML for controls other than <Image>, such as <MediaElement> and <WebView>.
  • Fixed exception when binding a Color to a Brush (such as when binding DropShadowEffect.Color to Border.Background)
  • WrapPanel no 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.com
For 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.

Logo: cshtml5_high_resolution_logo.png (1700px*1700px, 60KB)