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

The Beta 12 of C#/XAML for HTML5 is here with over 50 new features!


September 20, 2017 — The new beta 12.0 of C#/XAML for HTML5 is available! The free Visual Studio extension that enables developers to create HTML5 apps using only C# and XAML has reached a new milestone. With both bug fixes and new features, this update is recommended to all users.


Share the news:


What's new since Beta 11.0:

 

→ Visual Studio 2017 compatibility

 

→  Improved <Grid/> - RowSpan, ColumnSpan

  • Better performance
  • GridSplitter compatibility
  • Based on the new HTML5 "Grid Layout" instead of <table/>
  • Note: RowSpan and ColumnSpan in Simulator are coming soon

 

→  Silverlight Migration Wizard

  • It can be launched from the Tools menu of Visual Studio
  • It helps to create the folders structure and add the files "as link"
  • Note: manual work is still required: please read the Silverlight Migration Guide

 

→  SignalR

  • Create real-time client-server applications in minutes!
  • Data is pushed from the Server to the Client via Web Sockets

 

→  Cleaner, customizable Output folder

  • Fewer generated files, uncluttered Output
  • Customize the location and structure of the Output
  • Ability to output to existing ASP.NET projects

 

→  Improved XAML Preview

  • The XAML Editor now displays styles located in App.xaml Resources and Merged Dictionaries
  • Ability to get rid of the "Phone" or "Tablet" look
  • Viewing options are persisted between tabs

 

→   Printing

 

→   New versions of the following open-source extensions:

 

→  More than 40 major XAML improvements!

  • DockPanel
  • TextBlock.Inlines and Runs (for rich text formatting, including support for: Bold, Italic, Underline, Hyperlink, LineBreak, Span, and Run)
  • AutoCompleteBox
  • Support for Relative Path in <Image Source="..."/>
  • Tuple<>
  • ClickCount (to handle double-click and triple-click)
  • {x:Null}
  • ContextMenuService
  • Animations
  • "BeginTime" and "RepeatBehavior"
  • CheckBox.IsThreeState
  • Clipboard.SetText
  • Binding.FallbackValue
  • Binding.TargetNullValue
  • Linear gradient brush with absolute coordinates
  • String.Insert, TrimStart, TrimEnd
  • HtmlPage.Window.Navigate(uri)
  • HtmlPage.Document.DocumentUri
  • DragDropTarget (AllowDrop, ItemDragStarting, DragOver, DragLeave, ItemDroppedOnSource, DragEventArgs…)
  • ArcSegment
  • KeyEventArgs.PlatformKeyCode
  • Negative values in Shapes Animate Width and Height
  • Programmatically create and run storyboards and animations
  • Storyboard.Completed
  • Nullable types in WCF
  • Nullable types with XmlSerializer
  • DateTime.Ticks, AddTicks, Millisecond, AddMonths, AddYears
  • Data-bind shape properties
  • TextBox.IsReadOnly, SelectAll()
  • ScrollViewer.Vertical/HorizontalOffset
  • ListBox.SelectAll()
  • IsEnabledChanged
  • ListBox.SelectionMode.Extended
  • LinearGradientBrush.SpreadMethod.Repeat
  • PasswordBox.SelectAll()
  • StringBuilder.Insert
  • double.IsInfinity, IsNegativeInfinity, IsPositiveInfinity
  • Convert.ToDateTime(string)
  • Int32.CompareTo
  • UIElement.IsPointerCaptured

 

→  And also 85 refinements and bug fixes!

Refinements:

- Support for Storyboards that contain nested Storyboards
- The default font size has been changed from 16px to 11px in order to be the same as standard XAML and the other XAML platforms (UWP, WPF, Silverlight...). The default line spacing has also been fixed.
If you want to revert to the previous default size, just add FontSize="16" to the root of the XAML of your Page.
- The default accessor of "OnApplyTemplate" is now "protected" (for best compatibility with UWP code), and "public" in SL Migration projects
- 3X faster DataGrid control
- New constructor of the "PropertyPath" class that takes a "DependencyProperty" as argument
- Support for defining a Shape size in XAML
- Added an option to activate using a Proxy
- Added the following classes: ServiceKnownTypeAttribute, XmlSerializedFormatAttribute, OperationFormatStyle, and OperationFormatUse
- The "InitializeComponent()" method is now marked as "public" (like in MS XAML) rather than "private"
- Ability to change the DispatcherTimer interval while the time is running
- Revamped "Button.Click" event implementation so that it the PointerPressed/Released events do not bubble up
- The browser blue text selection is now temporarily disabled while dragging (ie. when mouse is captured)
- The default value of "Rectangle.Stretch" and "Ellipse.Stretch" is now "Stretch.Fill" rather than "Stretch.None"
- More overloads for String.Equals(string, StringComparison), String.Equals(string, string), and String.Equals(string, string, StringComparison)
- Item templates now also appear in parent folders

Bug fixes:
- Improved support for Timeline.Duration
- Improved accuracy of the Path control and the Thickness property
- Improved accuracy of the LinearGradientBrush
- Improved DateTime support and serialization
- Improved support for Nullable.Equals, including when the value is null, such as in: ((int?)null).Equals(45)
- Improved reliability of Negative Margins
- Improved the reliability of Dictionary<> and HashSet2<> when adding and then removing a reference type
- Improved accuracy of positioning of <Image> controls
- Fixed issue where typing on a TextBox in Internet Explorer did not raise the TextChanged event, and bindings were not updated (it worked only on LostFocus)
- Fixed "DateTime.Parse" so that it also reads Hours, Minutes, Seconds, and Milliseconds
- Fixed an issue that prevented multiple animations to target the same property (useful when they have a different BeginTime)
- Fixed "Char.Equals"
- Fixed serialization/deserialization of "Char" types
- Fixed passing Char types in WCF calls
- Fixed an issue where the LinearGradientBrush was not rendered on Grids and other Panel controls
- Fixed an issue where setting the value of a property that had a TwoWay binding removed the binding (for example, programmatically setting the "Text" value of a TextBox that had a TwoWay binding defined in XAML broke the binding, as well as any Validation)
- Fixed exception when setting the "Padding" property of a "PasswordBox"
- Fixed an issue that prevented serialization and WCF from working in projects of type "Silverlight Migration Edition".
- Fixed NullReferenceException when attempting to add items to the "PathGeometry.Figures" or the "PathFigure.Segments" collections.
- Fixed an exception with ArcSegment when IsLargeArc was not set.
- Fixed an issue that caused the bottom and right borders of rectangles to not be drawn.
- Fixed an issue where controls with negative margins inside a Grid would be cropped. Note: if you want the Grid to crop the content that exceeds its boundaries or that exceeds the boundaries of a row or column, be sure to set the "Grid.ClipToBounds" property to "True".
- Fixed an issue that affected VerticalAlignment and HorizontalAlignment.
- Fixed an issue where Binding an overridden property did not work
- Fixed an issue where the System.Reflection "GetProperty" method did not work properly with overridden properties
- Fixed an issue where default(DateTime) was equal to 01/01/1970 instead of 01/01/0001
- Fixed a crash that occurred when "DropShadowEffect.Opacity" was out of range
- Fixed an issue where too many web services and serializable classes resulted in the compilation error code 9020
- Fixed an issue where iterating an HashSet<T> with a "foreach" statement would produce instances of type "object" rather than type "T"
- Fixed an issue where validation tooltips did not move when scrolling
- Fixed the exception when setting TextBox.MaxLength in a SL Migration project
- Fixed an issue where changing a property of a Shape (Line, Rectangle, Ellipse, Path...) did not trigger a redraw of the shape
- Fixed an issue when binding a non-string property to a string property
- Fixed the compilation error when setting x:Name in a stand-alone XAML ResourceDictionary file
- Fixed the NullReferenceException where using <Application.Resources> without the <ResourceDictionary> tag
- Fixed the errors "Width cannot be lower than 0" and "Height cannot be lower than 0"
- Fixed "OutOfMemoryException" when compiling very large C# files
- Fixed a TwoWay binding issue
- Fixed an issue where the content of the Popup control could not be changed once the popup was opened
- Fixed an issue where if a Shape was hidden when added to the visual tree, it was not drawn, so it did not appear when the control later became visible
- Fixed NullReferenceException in the XAML Inspector of the Simulator
- Fixed an issue where common styles sometimes were not displayed in the XAML Editor
- Fixed an issue with the XmlSerializationReader in the browser
- Fixed a DataGrid issue that resulted in the last column not being correctly drawn
- Fixed an issue where marking a pointer routed event as "Handled" did not stop the event from bubbling up
- Fixed the behavior of the DispatcherTimer when the Interval was not set
- TextBox validation tooltips are now also hidden when the TextBox is hidden under another control
- Fixed UI issues with the Grid when the total of the columns or rows size was less than the size of the Grid
- Fixed an issue where applying a DropShadowEffect resulted in a 2px padding
- Fixed an issue where it was not possible to change the Visibility property of the PopupRoot control
- Fixed an issue where getting Window.Current.Bounds resulted in an exception when running in the Simulator
- Fixed an issue where the TextBox control did not stop the pointer events from bubbling up
- Fixed the return value of "UIElement.CapturePointer"
- Fixed an issue that prevented building the project: a XAML file was set as "Page" rather than "Resource".
- Fixed an issue where a null value in a dependency property was considered the same as if the dependency property was not set
- Fixed an issue with LinearGradientBrush that caused UI glitches depending on the coordinates
- Fixed an issue where TextBox.Text could be null if data-bound to a null value
- Fixed the default value of ScaleTransform.ScaleX and ScaleY, so that applying only one of the two does not produce incorrect results
- Fixed the error "TypeError: get_InnerException is not a function"
- Fixed JSIL error "untranslatable method" when using non-CSS-based grid layouts
- Fixed an issue that prevented elements from being centered inside a ScrollViewer
- Fixed an issue where the content of a ScrollViewer sometimes was left-aligned instead of centered
- Fixed a Grid exception that happened in some cases when using Grid.ColumnSpan
- Fixed an issue where binding to a null value could cause an exception
- Fixed an issue where the DataGrid did not fill the whole width of the parent if all its columns were set to "Auto" or to a pixel size
- Fixed String.Join
- Fixed Array.Clear
- Fixed an issue where parsing a TimeSpan from a string with a sub-second part (ex:0:0:0.8 or 0:0:1.5) returned the wrong result in browser
- Fixed issue with WCF services returning void on VS2015
- Fixed an issue where a WCF web method that returned an "int" or another value type did not work
- Fixed the JavaScript error: "3 candidate(s) for method invocation SetException"
- Worked around the issue where resizing the FireFox window could cause the UI of the app to disappear
- Fixed an error that appeared in the browser when editing a cell of the DataGrid

 


Download Now (Free):

  • To download now, go to www.cshtml5.com and click Download.

    Users who registered for one of the previous betas have been sent an email containing the download link. If you have not received it, please contact us.




Please vote for your most wanted features on
UserVoice.

Want to migrate a Silverlight application to the web? Read our Silverlight Migration Guide.

 

About C#/XAML for HTML5:

C#/XAML for HTML5 is a free extension for Visual Studio that enables developers to create cross-platform HTML5 apps exclusively using C# and XAML.

It is designed for developers using C#, XAML, and Visual Studio to extend application reach to platforms outside the Microsoft ecosystem, including Android, BlackBerry, Chromebook, iOS, Linux, Mac OS, and web browsers. It can be used to migrate Silverlight apps to HTML5, as well as to create new client-side rich web applications without manipulating HTML, CSS, and JavaScript.

Benefits over alternative cross-platform development tools include zero learning curve for C#/XAML developers, a robust well-organized strongly-typed development experience, the ability to share C# code between the client and the server, and the ability to port legacy apps to the modern web with minimal effort, notably to convert Silverlight apps to HTML.

More information and download can be found at: www.cshtml5.com


About Userware:

Userware is a software company founded in 2007 by two experts in Microsoft technologies. It has gained popularity in the recent years for consumer apps such as XLS Editor (#1 Paid Productivity App in the Windows Store for 8 consecutive months), and WikiOS.org, a patent-pending online operating system made in Silverlight that can be enhanced Wiki-style by users using an online development environment. With "C#/XAML for HTML5", Userware aims to enable all C#/XAML developers to build cross-platform HTML5 apps with the skills, tools, and code base they already have.

Userware is online at: www.userware-solutions.com


Contact:

You can contact the team behind C#/XAML for HTML5 at: hello@cshtml5.com

 

For more information, please visit www.cshtml5.com