Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Uno Platform 4.7 Update Brings Simpler Solution and Performance Improvements

Uno Platform 4.7 Update Brings Simpler Solution and Performance Improvements

The open-source UI framework for cross-platform C# and XAML applications, Uno, has been updated to version 4.7. It brings a simplified solution experience in Visual Studio, performance updates on different platforms and other minor updates.

Uno platform is an alternative UI platform for building multidevice applications in C# and XAML. It was launched in 2018, after years of internal use by a Canadian company nventive. It allows developers to write applications for Windows, iOS, Android, WebAssembly, macOS and Linux. It is released under Apache 2.0 open-source license on GitHub.

While the official cross-platform UI libraries from Microsoft, Xamarin and .NET MAUI, strive to use native controls on each supported platform, Uno uses a mixed approach. It leverages the underlying UI primitives to render the same chromeless UI everywhere while it uses the cross-platform 2D graphics library Skia to draw the same UI style on all platforms. Internally, it leverages WinUI 3 API on Windows and reproduces the same API surface to all supported platforms, as demonstrated by the pixel-perfect port of the Windows Calculator app. For .NET developers, this means they should start designing and implementing the WinUI application first and Uno would take care of rendering and running it on all the supported platforms.

Version 4.7 of Uno platform simplifies the solution development experience in Visual Studio. In the previous versions of Uno, the Visual Studio solution had one project per each supported platform (or head, in Uno jargon) plus a shared project (with the suffix ‘.Shared’) where the shared code and shared assets live. In Uno 4.7, this shared project is removed and replaced with a new cross-platform library. This means that NuGet packages, for example, can now be added to the shared library only and not on every targeted head project (device-specific project in Visual Studio). Similarly, the new project template now includes the Uno Fluent Symbols font for all devices.

The framework team also took care of user feedback on GitHub and improved the performance of several back-ends. Specifically, WebAssembly applications are now trimmed to remove unused XAML styles and controls. .NET 7 performance updates are used for loading and unloading of controls in WebAssembly target applications, resulting in an alleged 8% runtime improvement.

Linux targets now use .NET native ahead-of-time (AOT) compilation, with faster startup and improved performance, skipping the use of JIT (just-in-time) .NET feature. Android performance has been enhanced by moving portions of cross-platform code instructions entirely to the Java side of the solution.

Updating Uno solutions to 4.7 involves updating the underlying NuGet packages. New solutions will use the shared library approach for the Visual Studio solution, while the existing solutions will keep the shared project approach.

According to .NET developers' discussions on social media, the main advantage of the Uno platform over MAUI or Xamarin is being the only cross-platform .NET framework to support writing WebAssembly and Linux applications in C# and XAML.

About the Author

Rate this Article