Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Uno Platform 5.0 Release: C# Markup and Productivity Improvements

Uno Platform 5.0 Release: C# Markup and Productivity Improvements

This week, Uno Platform released version 5.0 of their framework for building native mobile, desktop, and WebAssembly apps. With this version, developers can now develop the .NET application using only one language with C# Markup and entirely using C# programming language as an approach. The release also brings C# Markup to the Figma extension, Hot Reload and MVUX improvements.

The Uno Platform team stated that C# Markup was a massive community request for building the apps, and from this version developers can build the UI layer using C# only. C# Markup is a user-friendly tool for developers. It allows them to define how their apps should look without needing to learn a whole new programming language. As reported, developers can use the same elements you already know from Uno Platform apps. The original announcement post shared the comparison diagram, where two approaches are compared and the similarity between them.

(Source: Five is for 5X productivity. Announcing Uno Platform 5.0, original announcement post)

The C# Markup support for the standard WinUI controls, as well as controls included in Uno.Toolkit and Uno.Extensions. Regarding this, the Uno Platform Figma extension was also updated and now it is supporting the C# Markup. Developers can export components and Figma designs to C# markup and XAML code, and integrate the generated code into the Uno Platform application codebase.

The 5.0 version is aligned to C# Markup so the Hot Reload feature has been enhanced to offer a consistent experience whether working with XAML, C#, or C# Markup in Visual Studio or Visual Studio Code on Windows, macOS, or Linux. As mentioned in the original announcement post, there is a known issue with .NET 8 that affects iOS, Android, and Catalyst targets. Therefore, for XAML, these platforms are currently utilizing a hot reload feature based on XamlReader. It is worth noting that a solution for this issue is expected to be delivered in the first service pack for .NET 8, which is planned for release in December.

Regarding the Hot Reload and U, the latest release, enhancements have been made to MVUX (Model-View-Update eXtended), capitalizing on the improvements in Hot Reload. Developers now have the flexibility to make adjustments to both the Model and the View, whether in XAML or C# Markup, without the need to restart the application. Furthermore, in the realm of C# Markup, it is now possible to employ MVUX controls, such as FeedView, to define various states within the application.

Furthermore, in this release, Xamarin support is discontinued, and support for .NET 6 for Mobile targets has ended. Developers are encouraged to transition to .NET 7 or upcoming .NET 8. For those using Windows SDK 18362, it's important to update the minimum SDK version to 19041.

Lastly, regarding the other breaking changes, Uno Platform 5.0 introduces adjustments to align more closely with WinUI. These changes primarily impact the binary level but maintain source compatibility. As stated, the upgrading to Uno Platform 5.0 generally addresses these changes.

About the Author

Rate this Article