News

Xamarin.Forms 2.4.0 Released with .NET Standard 2.0 Support

With help from more than 20 open source community developers, a stable release of Xamarin.Forms 2.4.0 is out, introducing several new features and supporting .NET Standard 2.0 for consistent API usage.

Xamarin.Forms is an open source UI library/framework that allows C# programmers to create native iOS, Android, Windows and macOS apps with Visual Studio and Visual Studio for Mac.

One major feature of the new 2.4.0 release is support for .NET Standard 2.0, which details the set of APIs that all conformant .NET implementations must provide. Its latest version features more than 32,000 of such APIs.

"As support begins to take off for .NET Standard 2.0, we have made sure Xamarin.Forms works seamlessly with both the standard and existing PCL profiles," said David Ortinau in a blog post yesterday. To fully leverage .NET Standard 2.0 APIs, programmers must use Visual Studio 2017 15.3, released last month. Note that the Xamarin.Forms 2.4.0 release notes warn "Not all build features may work" in .NET Standard projects.

.NET Standard 2.0
[Click on image for larger view.] .NET Standard 2.0 (source: Microsoft).

Another new addition is an API for feature flags, a setting that programmers can use to enable or disable features. "This will enable you to benefit from features or behaviors that may be of high value to you without introducing changes that you may not want," Ortinau said.

In this initial rollout of feature flags, they only work with what Xamarin calls "fast renderers" for Image, Button and Label controls in Android projects. Fast renderers result from a refactoring of the renderer architecture for performance and memory consumption optimization, doing away with wrapper classes and thus reducing the number of elements in a Xamarin.Forms UI hierarchy.

Reducing UI Elements
[Click on image for larger view.] Reducing UI Elements (source: Xamarin).

The 2.4.0 release notes explain more:

This version of Xamarin.Forms includes new Android renderers for Image, Button, and Label, which have been code named "fast renderers". These greatly reduce the render time for these controls, but may also change the behavior of your application if you have created custom renderers or are using third-party controls that override the default renderers. For this release, the default set of renderers will be the legacy renderers to prevent any issues in existing apps, but you may opt in to using the new fast renderers using our new feature flag API.

Also featured is a preview of Xamarin.Forms macOS, fixing bugs discovered in the project's pre-release cycle.

Ortinau thanked "the more than 20 amazing community members that contributed to making this a fantastic release," which he described as " our fastest, most stable release ever."

According to the Xamarin.Forms GitHub site, the overall project to date has benefitted from 79 contributors.

Looking at the Xamarin.Forms roadmap, VNext-previews will be released in the third quarter of this year, with the next stable release set for the fourth quarter.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • See Prompts Microsoft Engineers Use for Bleeding-Edge Multimodal RAG AI Research

    Vision-centric queries show how front-line experts are prompting LLMs these days.

  • AI Explains Expressions in Update to Java on VS Code

    "The Spring Tools now show code lenses above these expressions that allow you to quickly let GitHub Copilot explain those statements for you."

  • Microsoft Eases Integration with Semantic Kernel AI SDK

    The basic idea is to provide unified API abstractions, especially for idiomatic C# code, to help platform developers and others work with any provider with standard implementations for caching, telemetry, tool calling and other common tasks.

  • Final .NET 9 Preview Ships with Go-Live License

    Visual Studio developers can now download the SDK for .NET 9 Release Candidate 2 with a go-live license, meaning devs get Microsoft support for production applications even before the framework reaches general availability next month.

Subscribe on YouTube