🕓 5 MIN Hot Design is here, …
Each release, we don’t just improve—we aim to revolutionize your development experience. For this release, we focused on drastically reducing the time and complexity required to package and distribute your cross-platform applications, in addition to a plethora of other productivity and performance features. Â
Our new App Packaging automates the process of bundling binaries, assets and dependencies into platform-specific installers for Linux, macOS and Windows on desktop. And, yes, that’s in addition to the seamless support we already provide for Mobile and Web packaging. It saves hours of frustration and eliminates dozens of manual steps typically required to prepare your app for publishing—all with just a few commands or clicks. Â
In addition to app packaging improvements, we are adding support for .NET 9 RC2 with WebAssembly, OpenGL Support, WebView2, New Skia Canvas, Combo Box and Templated Parent.
It’s a big release, grab a coffee and let’s dissect it topic-by-topic.  Â
Traditionally, regardless of the tech stack you are using, app packaging is one of the most dreaded tasks developers face when getting an app to end-users.
While in the past we supported easy store packages creations for iOS, Android, Catalyst and WebAssembly, we’re now introducing packaging improvements for Windows (ClickOnce), Linux (Snap) and macOS (.app) for our desktop targets.Â
With our new packaging feature, you will be able to generate executables quickly, allowing for easy installation across various operating systems, or getting the package to be store-ready with just a few commands or clicks.
The changes are included in the “dotnet publish” command, which allow for generating platform specific packages suitable for installing on different operating systems.Â
Here’s a dependency graph of the packaging features:Â
We’re planning to add support for more package types on various operating systems, such as dmg, pkg or flatpack.
To generate a snap package of an uno app, you can run the following command from a Linux shell:Â
dotnet publish -f net8.0-desktop -p:SelfContained=true -p:PackageFormat=snapÂ
This will generate a snap package that you can install with the following command, or publish on the snap store:Â
sudo snap install myunoapp_1.0_amd64.snap --dangerous --classic
Similarly, you can generate a “.app” package on macOS with the following command:Â
dotnet publish -f net8.0-desktop -r osx-arm64 -p:SelfContained=true -p:PackageFormat=appÂ
You can then take the generated “.app” folder and drag it to the “Applications” folder.Â
This whole process takes just a few minutes! You can find more information about publishing desktop apps in our docs.Â
With .NET 9, we’re now integrating directly with its SDK and workloads, eliminating the need for separate installs like Python, Emscripten, or ninja-build. Now, developers only need the .NET SDK and workloads to build WASM apps.Â
Previously, we built our own .NET WebAssembly runtime, but Microsoft’s SDK and runtime now surpass what we needed, making it logical to use and contribute to this industry-standard approach.Â
The Uno.Wasm.Bootstrap package now serves as an integration layer on top of the .NET WebAssembly SDK, removing our custom runtime. It seamlessly interacts with JavaScript and MSBuild APIs, supporting PWAs, Hot Reload, and memory profiling, letting users enjoy ongoing .NET Runtime improvements and fixes.Â
Among the SDK features that are now available as part of .NET 9:Â
Among the other benefits of moving to .NET 9 official workloads, Uno Platform becomes very easy to migrate to use the upcoming alpha builds of .NET 10. This is going to be particularly important for Threading support that is likely to arrive in the .NET 10 timeframe.Â
Note:Â The 5.5 update only addresses WebAssembly support for .NET 9, as our mobile and desktop support for .NET 9 release candidates has already been baked in since the Uno Platform 5.3 release.Â
Uno Platform also provides these additional features:Â
When it comes to threading, Microsoft’s runtime team has made major changes to how threads interact with the DOM and JavaScript, aiming to improve stability.
Since threading was, and continues to be an experimental feature, these changes now prevent managed code from running on the main JavaScript thread — something Uno Platform depends on.
As a result, WebAssembly threading is currently not supported in Uno Platform apps. However, as Microsoft’s runtime team is working on it, we hope that the support for threading may return in future .NET 10 preview builds.Â
Additionally, .NET has improved its runtime performance, bringing down by half the startup time for an already cached app. For example, the loading time with our .NET 9-updated Uno Calculator and Uno Playground went down by a significant margin. Â
To upgrade to .NET 9 and the new bootstrapper, two paths are available:Â
Â
In all cases, you’ll now need to install the “wasm-tools” .NET workloads:
dotnet workload install wasm-toolsÂ
You can get more details about upgrading to .NET 9 in our documentation.Â
.NET 9, combining all the options enabled, brings interesting size improvements ranging from 7% to 56% depending on compilation modes.Â
Comparing with previous .NET 8 and uno.wasm.bootstrap, when running a blank template:Â
 | Queries | Uncompressed size (MB) | Compressed size (MB) |
net8 + interpreter | 77 | 26.7 | 8.4 |
net9 + intepreter | 82 | 24.8 | 6.6 (-27%) |
net8 + Profiled AOTÂ | 77Â | 34.2Â | 10.2Â |
net9 + Profiled AOTÂ | 82Â | 31.9Â | 9.5 (-7%)Â |
net8 + AOTÂ | 77Â | 83.1Â | 20.2Â |
net9 + AOTÂ | 82Â | 77.8Â | 12.9 (-56%)Â |
We are excited to bring WebView2 control support to WebAssembly, making our solution the only cross-platform XAML framework to offer this functionality.  It allows you to display basic external or local web content within your WebAssembly Uno Platform application.
The control is natively based on an iframe, which means it adheres to the browser security restrictions. For instance, the external site must not use X-FRAME-OPTIONS to prevent embedding. If you are in control of the target site, you can use the frame-ancestors Content Security Policy to specify your app’s URL to allow embedding it in this manner, while keeping the ability disallowed for other sources.
With this release, we’re introducing the support for hardware accelerated rendering OpenGL 3D content directly in Skia Desktop targets for Linux, Windows and macOS, as well as Windows App SDK. The new GLCanvasElement control allows natively embedding 3D graphics sections in your 2D app.Â
This new control is using Silk.NETÂ to provide the managed APIs to interact with OpenGL. This control also automatically handles the setup and lifecycle of the 3D rendering context in a unified 2D Skia environment, across all desktop platforms. You only need to draw your content!Â
This is a great example of our enterprise support program as this pretty big feature has been co-financed with a client. Our sincerest thanks go to our (anonymous) client as we can now offer OpenGL to the entire Uno Platform community!!
On the technical side, for Windows and Linux, OpenGL is used directly and on macOS, Metal is used through the ANGLE library:Â
You can find a sample on how to use the GLCanvasElement in our Uno.Samples repository, as well as read our docs.Â
To significantly improve the performance of Skia-based user code, we’re introducing the new SKCanvasElement control that integrates directly with the Uno Platform Skia Desktop rendering pipeline to use hardware acceleration.Â
For instance, you can draw content similar to samples fiddle.skia.org can provide:Â
Currently, when using SKXamlCanvas from SkiaSharp, the Skia content is rendered using software rendering, then copied onto a hardware accelerated surface.Â
With this new Control, the Skia canvas that the Uno Platform renderer uses is provided to developers, giving the ability to render content at the same speed as Uno Platform does, using all the features SkiaSharp provides.Â
Here’s an example of code which uses SkiaSharp directly:Â
#if HAS_UNO_SKIA // This control is only available on netX.0-desktop
public class MyCanvas : SKCanvasElement
{
protected override void RenderOverride(SKCanvas canvas, Size area)
{
var minDim = Math.Min(area.Width, area.Height);
// rescale to fit the given area, assuming each drawing is 260x260
canvas.Scale((float)(minDim / 260), (float)(minDim / 260));
// https://fiddle.skia.org/c/@shapes
var paint = new SKPaint();
paint.Style = SKPaintStyle.Fill;
paint.IsAntialias = true;
paint.StrokeWidth = 4;
paint.Color = new SKColor(0xff4285F4);
var rect = SKRect.Create(10, 10, 100, 160);
canvas.DrawRect(rect, paint);
var oval = new SKPath();
oval.AddRoundRect(rect, 20, 20);
oval.Offset(new SKPoint(40, 80));
paint.Color = new SKColor(0xffDB4437);
canvas.DrawPath(oval, paint);
paint.Color = new SKColor(0xff0F9D58);
canvas.DrawCircle(180, 50, 25, paint);
rect.Offset(80, 50);
paint.Color = new SKColor(0xffF4B400);
paint.Style = SKPaintStyle.Stroke;
canvas.DrawRoundRect(rect, 10, 10, paint);
}
}
#endif
This control can be added as a child of any other Panel in your UI.Â
We intend to make changes in SkiaSharp in order to use this new feature and improve the performance of the SKXamlCanvas rendering.
ComboBox was supported by Uno Platform since the initial release, but its implementation was not aligned with the original source in WinUI. As a result, we lacked some significant features including support for IsEditable property, which allows the user to enter a custom value instead of just selecting a predefined item from the drop–down list.Â
Also, while we had to custom code the best ComboBox based on our community and clients’ needs, this does not align with our vision of reusing existing WinUI controls whenever possible. It was time to change this and align with the original source!
The new ComboBox is a completely new port of WinUI ComboBox! We ported over three thousand lines of code from WinUI, bringing in not only editability support, but also additional missing behaviors including keyboard input support, and focus handling. The changes even required improvements on the base Selector primitive!Â
Finally, to make sure our behaviors match WinUI, we added around 40 integration tests, which are run across all our targets and ensure everything runs reliably.Â
You can experiment with this new feature in the Uno Playground.Â
In this release, we’re addressing a long-standing behavior difference with WinUI with TemplatedParent.Â
In WinUI, TemplatedParent is an XAML-only concept that processed when a Control template is materialized from a XAML file. Specifically, if an element from a XAML-materialized control template is being removed, or a foreign element is added, the TemplatedParent value will not be updated.Â
In Uno Platform, we initially implemented this feature as an inherited property back when the WinUI source was not publicly available. Our approach led to subtle differences in how TemplatedParent and TemplateBindings were processed, which required numerous small adjustments both within Uno Platform and in user applications to closely match the official WinUI behavior, which was not ideal and was preventing you from getting maximum productivity. Â
Thanks to WinUI now being open source, with Uno Platform 5.5, we’re bringing this feature to parity with the official behavior, closing tens of related issues. In most cases, your app will not be affected by this change, but if you had included workarounds regarding Template bindings, those can be removed.Â
Performance is a recurring theme at every release. We continued improving memory and runtime performance with this release:Â
Those improvements are wide reaching, as they touch most controls and their properties. You may notice improved performance for larger applications.Â
Ready to upgrade to 5.5? Here’s what you need to know:
Alongside our 5.5 release, our marketing team has been busy giving our website a serious upgrade! We’re aiming to bring you even more perks for staying connected with us and the Uno Platform community.
Create an account for seamless access to all our extensions—Visual Studio, Visual Studio Code, and Rider—through a single registration. You’ll also unlock early access to exciting new features and have a direct line for sharing feedback to help us improve. Looking to connect? Share your social profiles to easily network and engage with the Uno community!
If you’ve made it this far in the blog, you are a true Uno Platform fan. And we’ve built something unique to further help with your productivity. If you’d like to be one of the first to try it out, please sign up at Uno Platform Waitlist.Â
Tags: XAML, WPF, Xamarin, UWP, Silverlight, .NET, Windows, C#, XAML
🕓 2 MIN Need a last-minute holiday …
Uno Platform
360 rue Saint-Jacques, suite G101,
Montréal, Québec, Canada
H2Y 1P5
USA/CANADA toll free: +1-877-237-0471
International: +1-514-312-6958
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Uno Platform 5.2 LIVE Webinar – Today at 3 PM EST – Watch