BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News What's New in Xamarin.Forms 5.0

What's New in Xamarin.Forms 5.0

Bookmarks

The new Xamarin.Forms 5.0 release introduces hundreds of quality improvements and brings to stable release several new controls and features, including App Themes (Dark Mode), Brushes, CarouselView, RadioButton, Shapes and Paths, and SwipeView.

Xamarin.Forms is an open-source mobile UI framework from Microsoft for building iOS, Android, and Windows apps with .NET and Visual Studio from a single shared codebase. XAML and C# can be used to declare UI and to combine them with common architectural patterns like MVVM and Reactive UI.

One of the most relevant changes is regarding WebView on iOS. UIWebView is no longer available, and it has been removed due to Apple's warning of depreciation and possible app rejection regarding usage of this control in iOS apps. It is recommended for all libraries to make sure to switch to WKWebView as well.

Experimental features like C# UI, Expander, and MediaElement are now part (or will be soon) of Xamarin Community Toolkit. These features and controls are continuing to grow and improve. On the other hand, Xamarin.Forms moves into an extended stable release. At some point in time, they may be brought back into the core library.

MasterDetailPage has been renamed to FlyoutPage. This change is in accordance with the values of diversity and inclusivity. Respecting that, Microsoft decided to rename the "master" branch on GitHub to "main." Renaming MasterDetailPage to FlyoutPage reflects the behavior of the control even more. This is a deprecation, and the apps will continue to work for now without making this change. However, it is recommended to follow it before .NET MAUI is available.

RadioButton control now allows setting any content of it using a control template approach. Whenever it is a simple text or more complex UI to match the design needs. DataPages and Theme packages should be removed from the project because in Xamarin.Forms 5.0, these packages will no longer be built and shipped.

Release notes provide a few things developers need to read and have prepared before updating to the latest version. Other changes are regarding Android projects and Visual Studio. XFCorePostProcessor.Tasks - is also removed from the latest version since XF 2.5 is far enough away, and it is not necessary to keep this compatibility.

Android projects now require Android 10 or greater and Android X is the default for Xamarin.Forms projects. Regarding IDE, from this release Visual Studio 2019 is now a minimum version to work with, and Visual Studio 2017 is no longer supported. After successful migration to the latest release, existing projects can use the improved and stable version.

Scott Hunter in May 2020, said about .NET 6 and .NET Multi-platform App UI, "Xamarin.Forms will ship a new major version later this year and continue to ship minor and service releases every six weeks through .NET 6 GA in November 2021. The final release of Xamarin.Forms will be serviced for a year after shipping, and all modern work will shift to .NET MAUI". We can conclude that this is the last major release of Xamarin.Forms, and a final step before Microsoft releases the stable .NET MAUI version.

Xamarin.Forms 5.0 version is available as a NuGet package.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT