News

'F# Meets XAML' in Open Source Silverlight Alternative, OpenSilver 2.1

OpenSilver, an open source alternative to the long-gone Microsoft Silverlight, continues to add new language support to its XAML-based web application framework.

After adding support for VB.NET (in addition to C#) last October (see the Visual Studio Magazine article, "OpenSilver 2.0 Weds VB.NET with XAML for Web Apps"), corporate backer Userware today (Feb. 6) announced support for F#, Microsoft's functional-first programming language, in a new v2.1 update.

OpenSilver was created as an open source alternative to Microsoft Silverlight, a once-popular, cross-platform framework for creating multimedia-rich and interactive web applications that was discontinued by the company years ago to the dismay of many developers. OpenSilver is delivered via an Visual Studio SDK extension.

The Paris-based Userware this week said that blending F# and XAML combines the powerful functional programming of F# with the rich, declarative UI capabilities of XAML, providing a "unique synergy" promising faster development times, fewer bugs and more readable code.

"Why F#?" a blog post asks. "The integration of F# in OpenSilver 2.1 bridges the gap between functional programming and the development of rich, interactive web UIs. This unique combination allows developers to enjoy the benefits of both worlds: the expressive and concise syntax of F#, and the powerful, declarative nature of XAML for UI design."

That results in code like this:

F# Quicksort
[Click on image for larger view.] F# Quicksort (source: Microsoft).

Userware described the move as "a novel approach in web app development" that aligns with an industry shift toward more flexible and efficient frameworks while simultaneously enhancing OpenSilver's capabilities and also providing innovation opportunities within the .NET community.

"With this new update, developers can now include files such as 'App.xaml 'and 'MainPage.xaml' along with their F# code-behind counterparts ('App.xaml.fs,' 'MainPage.xaml.fs') in a single project," the company said. "This integration allows them to harness the strengths of both XAML and F#: XAML is well-suited for defining user interfaces, its declarative nature and templating system aiding in the design of complex UIs. Additionally, the forthcoming GUI designer for OpenSilver is expected to further streamline this process."

Speaking of forthcoming, future planned features include a WYSIWYG XAML designer, enhanced WPF support, XAML Hot Reload and integration with .NET MAUI.

Other new features and functionality in the v2.1 update, meanwhile, include:

  • Browser Compatibility: OpenSilver apps are compatible with all major browsers, without needing any plugins.
  • Newly Ported Silverlight Toolkit Samples: Comprehensive coverage of the Silverlight Toolkit is now in OpenSilver, including additional UI controls and advanced capabilities that can be experienced in the the ported "Silverlight Toolkit Samples" app.
    Silverlight Toolkit
    [Click on image for larger view.] Silverlight Toolkit (source: Microsoft).
  • Enhanced OpenSilver Showcase with 100+ F# Samples: More than 100 samples demonstrate the practical use of F# with XAML in the expanded OpenSilver Showcase.
    OpenSilver Showcaset
    [Click on image for larger view.] OpenSilver Showcase (source: Microsoft).
  • Other New Features in OpenSilver 2.1: The new release also includes a complete reimplementation of animations, mirroring Silverlight's capabilities, and improved low-level components, like text display.

The upcoming integration with .NET MAUI, Userware said, will broaden the scope for creating hybrid applications that utilize native platform APIs and simplify application deployments across different platforms.

"We are also committed to enhancing the developer support ecosystem, with new documentation on the way and expanded development support for macOS, VSCode and Rider," the company said. "Additionally, we're reviving the beloved Silverlight PivotViewer control and venturing into support for the development of 3D and Mixed Reality applications (see XR#), opening up a new universe of possibilities for developers."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Mastering Blazor Authentication and Authorization

    At the Visual Studio Live! @ Microsoft HQ developer conference set for August, Rockford Lhotka will explain the ins and outs of authentication across Blazor Server, WebAssembly, and .NET MAUI Hybrid apps, and show how to use identity and claims to customize application behavior through fine-grained authorization.

  • Linear Support Vector Regression from Scratch Using C# with Evolutionary Training

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the linear support vector regression (linear SVR) technique, where the goal is to predict a single numeric value. A linear SVR model uses an unusual error/loss function and cannot be trained using standard simple techniques, and so evolutionary optimization training is used.

  • Low-Code Report Says AI Will Enhance, Not Replace DIY Dev Tools

    Along with replacing software developers and possibly killing humanity, advanced AI is seen by many as a death knell for the do-it-yourself, low-code/no-code tooling industry, but a new report belies that notion.

  • Vibe Coding with Latest Visual Studio Preview

    Microsoft's latest Visual Studio preview facilitates "vibe coding," where developers mainly use GitHub Copilot AI to do all the programming in accordance with spoken or typed instructions.

  • Steve Sanderson Previews AI App Dev: Small Models, Agents and a Blazor Voice Assistant

    Blazor creator Steve Sanderson presented a keynote at the recent NDC London 2025 conference where he previewed the future of .NET application development with smaller AI models and autonomous agents, along with showcasing a new Blazor voice assistant project demonstrating cutting-edge functionality.

Subscribe on YouTube