BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News OpenSilver 2.1 Brings F# Support for the Silverlight Reimplementation

OpenSilver 2.1 Brings F# Support for the Silverlight Reimplementation

The latest version of OpenSilver 2.1, the remake of the discontinued Silverlight web application framework, introduces support for F# language. The update also contains migrated samples from the original toolkit and enables developers to use themes.

OpenSilver was launched in October 2021 by a French company, Userware. It is an open-source, MIT-licensed reimplementation of Silverlight. OpenSilver compiles .NET and XAML code into HTML5 and WebAssembly, reimplementing standard and selected third-party controls. It allows developers to reuse instead of rewriting their legacy Silverlight or XAML applications. The latest update to OpenSilver was version 2.0 in October 2023, with the introduction of VB.NET as a supported language.

F# is now fully supported in OpenSilver 2.1. It allows developers to use the functional programming paradigm of F# language together with the lightweight declarative UI framework such as XAML. The integration of F# includes support for F# code-behind files for the XAML pages.

The new release also brings a migrated version of the original Microsoft Silverlight Samples app for Silverlight and the Silverlight Toolkit. The code for the samples is available in the GitHub repository, and the samples can be viewed live on the OpenSilver Gallery page.

Several bug fixes and minor updates are included in this version. It also adds support for a theming framework to customise the UI appearance.

To start with OpenSilver, developers must download the OpenSilver VSIX package with the new templates. Once an OpenSilver application is created in Visual Studio, it will contain three projects: the OpenSilver project with the XAML and the code-behind files, the Browser project based on the ASP.NET Blazor WebAssembly and the Simulator project, which allows for more comprehensive debugging and usage of memory profilers.

The reactions from developers have been positive. Steve Gilham stated on his blog that F# in OpenSilver 2.1 "just works" with "no messing about…or having to create stubs for anything".

The OpenSilver 2.1 press release states that the roadmap will include a WYSIWYG XAML designer with full drag-and-drop support, as the current support is limited to rendering the XAML in the Forms Designer. Also mentioned is future support for .NET MAUI, WPF features and the LightSwitch rapid application tool.

The OpenSilver source code is available on GitHub. The repository containing OpenSilver has 909 stars and has been forked 115 times. Beyond the Userware developer team, there are other active contributions to the project, with a total of 48 contributors. According to the OpenSilver website, companies that rely on this framework include Bayer, TATA, KPMG, and others.

About the Author

Rate this Article

Adoption
Style

BT