CSHTML5 Goes Open-Source!

March 11, 2019

Today marks a very special day with 5 major announcements:

1. CSHTML5 Goes Open-Source!

After 5 years of only proprietary licensing, CSHTML5 is now open-source!

CSHTML5 – also called 'C#/XAML for HTML5' – has become popular among developers as the first production-ready solution to make web apps in C# and XAML. It is also the only tool that enables to port existing Silverlight and WPF applications to the web, by compiling C# and XAML files to HTML and JavaScript.

Making it open-source is part of the effort to make CSHTML5 a more open and flexible platform for developers.

The source code is now available on GitHub under the GNU General Public License (GPLv3) license.

2. New 'Community Edition' Makes Previously Paid Features Free For Hobbyists

All the features that were previously only available in the paid 'Professional Edition' are now free to use as part of the new 'Community Edition', which is for hobbyists, open-source projects, and academics.

The 'Community Edition' can be downloaded here.

3. Commercial Licenses Are Available For Freelancers And Organizations

CSHTML5 is now dual-licensed, meaning that it is available under both the open-source license and commercial licenses.

Commercial licenses allow freelancers and organizations to make proprietary commercial products. Multiple tiers are now available so that the cost of the license is now adapted to the size of the company.

Commercial licenses can be purchased here.

4. New Version 1.2 Released With 40+ New Features!

Today we are also releasing the version 1.2 of CSHTML5, with many exciting new features!

You can read the full changelog below. New features include support for implicit styles, Themes, Generic.xaml, DefaultStyleKey, Focus states, TabIndex, DatePicker, TimePicker, Improved WCF (authentication, async calls with callbacks...), Improved DataGrid (paging...), x:FieldModifier, XmlnsDefinitionAttribute, and much more.

The new version 1.2 can be downloaded here.

5. There Are Major New Features Planned For 2019

We have updated our roadmap with our plans for 2019 and 2020.

You can read the updated roadmap here.

That's it for now, we hope you like these announcements! Please be sure to send your feedback to hello@cshtml5.com, we are looking forward to hearing from you!

Press Kit:

- Press Release: press_release_cshtml5_goes_open_source.docx (Word, 14KB)

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

Full changelog of the new version 1.2:

New features and improvements:

Support for event-based asynchronous WCF SOAP calls! (Async/Completed+=...). NOTE: task-based asynchronous calls, and synchronous calls were already supported.

calls! (Async/Completed+=...). NOTE: task-based asynchronous calls, and synchronous calls were already supported. Support for Focus! This includes focus-related UI cues , focus navigation with the Tab key, focus-related VisualStates , GotFocus and LostFocus events on UI element, IsTabStop property, and more. NOTE: If you do not want to display the default focus rectangle, either apply a ControlTemplate with an empty Focused VisualState, or set the "IsTabStop" property to False, or set the "UseSystemFocusVisuals" property to False.

This includes , with the key, focus-related , and events on UI element, property, and more. NOTE: If you do not want to display the default focus rectangle, either apply a ControlTemplate with an empty Focused VisualState, or set the "IsTabStop" property to False, or set the "UseSystemFocusVisuals" property to False. Support for authentication/credentials in web service calls .

* In case of SOAP, the system will attempt to enable credential-related cookies , and if this is not supported, will fallback to normal calls.

* In case of REST, you can use the new " WebClientWithCredentials " class instead of the "WebClient" class in order to support credentials-related cookies. You can use the property "WebClientWithCredentials. CredentialsMode " and "Application.Current.Host.Settings. DefaultSoapCredentialsMode " to change the behavior.

. * In case of SOAP, the system will attempt to enable credential-related , and if this is not supported, will fallback to normal calls. * In case of REST, you can use the new " " class instead of the "WebClient" class in order to support credentials-related cookies. You can use the property "WebClientWithCredentials. " and "Application.Current.Host.Settings. " to change the behavior. Added support for " IsolatedStorageFile.DeleteFile "

" Added support for .cur resources (Note: like with all other resources, you need to set their "BuildAction" to either "Content", "Resource" or "EmbeddedResource" in order for the file to be properly copied to the JS output)

resources (Note: like with all other resources, you need to set their "BuildAction" to either "Content", "Resource" or "EmbeddedResource" in order for the file to be properly copied to the JS output) Improved data binding behavior when binding between values that have incompatible types (such as binding an Int32 with Boolean)

behavior when binding between values that have incompatible types (such as binding an Int32 with Boolean) Improved Control. Focus () so that it returns a boolean stating whether the element actually got the focus or not

() so that it returns a boolean stating whether the element actually got the focus or not Support for Control. UseSystemFocusVisuals

Support for DatePicker and TimePicker . The implementation is powered by "flatpickr.js"

and . The implementation is powered by "flatpickr.js" Ability to Drag the ChildWindow

The ChildWindow now has a semi-transparent background overlay . Note: the ChildWindow style and template can be customized: you will find the default one here.

. Note: the ChildWindow style and template can be customized: you will find the default one here. Support for Popup.StayOpen

Much improved " TypeScript Definitions to C# " compiler for accessing JS libraries in a strongly-typed manner

" compiler for accessing JS libraries in a strongly-typed manner Improved <Image> control alignment and stretch

Revamped DataGrid control ! Now supports PagedCollectionView for programmatically filtering and sorting + Built-in paging (default page size is 20 items, you can change it by setting the DataGrid.DataPager. PageSize property, set to -1 for no limit) + Alternate row background

! Now supports for programmatically and + (default page size is 20 items, you can change it by setting the DataGrid.DataPager. property, set to -1 for no limit) + Much improved performance of Linq to XML ( XDocument , XElement , XAttribute , etc.) and the DataContractSerializer

( , , , etc.) and the Added the possibility to create a XmlReader directly with a string for better performance, via XmlReaderHelper.Create(string xml)

directly with a string for better performance, via XmlReaderHelper.Create(string xml) Added DataPager control

control Added support for IEnumerable. DefaultIfEmpty

Default padding of buttons is now the same as in Silverlight and other XAML platforms (3,3,3,3)

is now the same as in Silverlight and other XAML platforms (3,3,3,3) Added Cshtml5_XmlReader and Cshtml5_XmlWriter as temporary workarounds for the lack of features of the built-in XmlReader and XmlWriter

and as temporary workarounds for the lack of features of the built-in XmlReader and XmlWriter Improved the default style of HyperlinkButton

Made the option "use http:// localhost " more visible in the Simulator

" more visible in the Simulator Improved Interop. ExecuteJavaScript to add support for Action<T> callbacks where T is a primitive or string type (no longer limited to T being "object")

to add support for Action<T> callbacks where T is a primitive or string type (no longer limited to T being "object") Support for "Task<T>. FromResult "

" Support for "Uri. EscapeDataString "

" Support for redirection from a single sign-on service

service Added the property "DataGrid. PageSize " that redirects to "DataGrid.DataPager.PageSize". Default value is 20 items per page. Set to -1 to disable paging.

" that redirects to "DataGrid.DataPager.PageSize". Default value is 20 items per page. Set to -1 to disable paging. Improved performance of XNode .ToString() and formatted XML serialization

.ToString() and serialization Support for Implicit styles !

! Support for DefaultStyleKey and "themes/ generic.xaml "

and "themes/ " Improved the WCF test application at: http://cshtml5.com/downloads/TestCshtml5WCF.zip

test application at: http://cshtml5.com/downloads/TestCshtml5WCF.zip Added option to format/indent the XML produced by the DataContractSerializer.SerializeToString(...) method

produced by the DataContractSerializer.SerializeToString(...) method Support for ThemeResources , ThemeDictionaries , and built-in system colors /brushes

, , and built-in /brushes Support for Application. TryFindResource (...)

(...) Support for defining "Storyboard. TargetName " at the Storyboard level (in addition to the already supported Animation level)

" at the Storyboard level (in addition to the already supported Animation level) Support for HashSet2. IntersectWith

Support for TextBox. CaretBrush (note: Edge does not support changing the caret brush color at the time of writing)

(note: Edge does not support changing the caret brush color at the time of writing) Added more namespaces so that there is no need to remove the "using" directives when migrating a Silverlight or WPF app, to make migration easier ("Microsoft.Win32", "System.Configuration", "System.IO.IsolatedStorage", etc.)

so that there is no need to remove the "using" directives when migrating a Silverlight or WPF app, to make migration easier ("Microsoft.Win32", "System.Configuration", "System.IO.IsolatedStorage", etc.) Improved StaticResourceExtension so that it now also looks in the Application's built-in resources if it couldn't find the resource in the XAML

so that it now also looks in the Application's built-in resources if it couldn't find the resource in the XAML Tooltips now automatically disappear after 5 seconds (like in other XAML platforms such as Silverlight)

now automatically disappear after 5 seconds (like in other XAML platforms such as Silverlight) Added built-in " BooleanToVisibilityConverter " (like in WPF)

" (like in WPF) Support for x:FieldModifier

Support for StaticResources inside attached properties

Support for attached properties with prefixes in XAML

in XAML Improved the performance of XDocument.Parse (text)

(text) Support for namespaces, prefixes, and attached properties inside the Value of a Setter within a Style in XAML

in XAML Support for the " Frame.NavigationFailed " event

" event Added support for square brakets in the "Storyboard.TargetProperty" (for animating gradient stops for example)

(for animating gradient stops for example) Added polyfill for String.startsWith () for IE11

() for IE11 Improved compatibility with the " clr-namespace " syntax when a System assembly is referenced ("Migration Edition")

" syntax when a System assembly is referenced ("Migration Edition") Tooltips now always stay within the screen bounds (previously, they could get cropped if they were close to the screen bounds)

now always stay within the screen bounds (previously, they could get cropped if they were close to the screen bounds) Enums in XAML are now case-insensitive, for improved compatibility

in XAML are now case-insensitive, for improved compatibility Added support for prefixes in the " TargetProperty " path of storyboards in XAML

" path of storyboards in XAML Removed the verbose logging of the TypeScript Definition files parser

of the TypeScript Definition files parser Fine-tuned the warning when the CredentialsMode is not appropriate ( CORS ).

is not appropriate ( ). Improved the compilation error message when an element in the XAML does not have a x:Key .

. Improved " Interop.loadJavaScriptFile " so that an exception is known if the specified JS script could not be loaded. Also improved "LoadJavaScriptFilesAsync" so that a callback can be specified in case of error.

" so that an exception is known if the specified JS script could not be loaded. Also improved "LoadJavaScriptFilesAsync" so that a callback can be specified in case of error. Improved the performance of the <Path/> control

control Moved the " TextDecorations " property to the class "Control" (rather than "TextBlock") so that it can be set on ContentPresenter to make styling easier

" property to the class "Control" (rather than "TextBlock") so that it can be set on ContentPresenter to make styling easier Support for " ServiceReferences.ClientConfig " for specifying the WCF configuration (in addition to "App.Config" which was already supported)

" for specifying the WCF configuration (in addition to "App.Config" which was already supported) Support for the " XmlnsDefinition " attribute (in "AssemblyInfo.cs") to associate an URL to a namespace. Example: CODE: [assembly:XmlnsDefinition("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Windows.UI.Xaml.Controls")]

" attribute (in "AssemblyInfo.cs") to associate an URL to a namespace. Example: Improved support for TextBox templating. Here is an example of TextBox template with round corners:

CODE: <Style x:Key="TextBoxStyle1" TargetType="TextBox">

<Setter Property=" HorizontalContentAlignment" Value="Right"/>

<Setter Property=" VerticalContentAlignment" Value="Bottom"/>

<Setter Property="Template">

<Setter.Value>

<ControlTemplate TargetType="TextBox">

<Border x:Name="OuterBorder"

Background="{TemplateBinding Background}"

BorderBrush="{TemplateBinding BorderBrush}"

BorderThickness="{ TemplateBinding BorderThickness}"

Padding="4"

CornerRadius="15">

<ContentPresenter x:Name="ContentElement"

Background="{TemplateBinding Background}"

Margin="{TemplateBinding Padding}"

HorizontalAlignment="Right"

VerticalAlignment="Bottom"/>

</Border>

</ControlTemplate>

</Setter.Value>

</Setter>

</Style>

Bug fixes: