DEV Community

Cover image for Turning it up to 11!
Dan Walmsley for Avalonia UI

Posted on

Turning it up to 11!

Image description

For the last 2 years the team has been working hard to bring the next generation of Avalonia.

This has focused on platforms, features and performance.

We are pleased to announce the release of 11.0 Preview 1 today. It is available immediately on NuGet.

So what's new?

Platforms

We have made huge strides forward to bring Avalonia to Android, iOS and Embedded platforms.

Until now Avalonia had been dominant on the desktop. However many users wish to reuse their UI code on mobile and in the browser.

In this preview we have almost production ready solutions for iOS, Android and browser.

We have also had a huge push on support for embedded platforms, like Raspberry Pi, Torizen and more. Avalonia is light weight and able to run without a desktop environment.

Avalonia is now highly optimized for low power embedded platforms. It is able to boot extremely quickly and maintain high framerates.

See these products from some of our customers that are using Avalonia in embedded industrial products.

Image description

Image description

New Features

New Visual Layer (Composition Renderer)

Extremely efficient renderer with no memory pressure allowing high frame rates even on low power embedded devices. You can achieve 240fps without breaking a sweat.

New rendering capabilities are also enabled. We shall go into this more in a future post.

Full Featured Text Rendering and Layout

Text rendering and layout is harder than most realize. Our team has been working on this for several years now. Avalonia now has full unicode support and is able to layout and render text from any language, including right to left.

We also now have full featured support for rich text and inlines. We have the full TextFormatter API from WPF implemented which allows controls and applications that rely on rich text formatting to be ported from WPF.

This is a huge advance and proves that Avalonia is ready for the world, your application can now be used by people in any culture and language.

Image Rich Text and Unicode

Avalonia now supports IME (input method editor) on all platforms, this means that languages i.e. CJK (Chinese, Japanese, Korean, etc) work as expected.

Image description

Accessibility

Accessibility is extremely important to us. We need to ensure that anyone can use the applications built on Avalonia.

We now have full support for accessibility on Window and MacOS. You do not have to make any changes to your application to enable this, it will simply just work. We have properties to customize accessibility names of components.

In future this support will be available also on Linux, Mobile and Browser.

Accessibility also enables new testing scenarios which leads us to….

Automated Testing

Automation or Automated testing is now possible. You can simply use Appium or other automated testing frameworks for desktop.

This means you can have a test that runs your application, interacts with it, and checks for the correct behavior.

This is traditionally how many applications are tested.

It is worth noting that Avalonia is a fully mockable platform. This means that you can actually test the same functionality inside unit tests with mocked controls and views.

We have had reports from customers stating that “migrating our tests from automated tests to mocked unit tests allowed us to run thousands of tests in just 3 seconds instead of several hours.”.

Having both mocked and automated tests gives developers the best opportunity to ensure the stability of their applications in production.

Control Themes

We have overhauled our styling system and added a new feature called Control Themes. This means that all the styles required for a control can be grouped together, and that you can apply different themes to specific parts of your application.

It also allows you to instantly switch between for example light and dark mode, which in the previous version could take a bit of time to process.

Control themes are also allowed to inherit styles.. Similar to WPFs “based on” styling mechanism.

Performance

There has been a huge focus on performance. Just upgrading to 11.0 will give your application a boost.

Themes, Styles and Resources are lazily loaded on demand. This means that your application will load much faster, without having to wait for everything to be pre-loaded.

Our XAML compiler has been optimized to produce less MSIL code. This means that there is less code to JIT. That also means your assemblies will be smaller, saving memory and reducing the footprint. Applications also load faster.

We have also optimised our styling system and renderer. Even on low powered devices it's now possible to load very quickly and render at very high frame rates.

These performance gains are particularly noticeable on low powered and embedded devices.

Why should you use Avalonia?

Avalonia is quickly becoming the choice of many big companies who need a UI platform they can depend on. Over the last 2 years Avalonia has successfully maintained its 0.10.x api, and proven it can provide a stable api that is enforced with api analysis and automated testing.

When 11.0 is released you will be able to rely on the api and know that it will remain stable and supported for years to come.

There are now a huge number of real applications in production. Avalonia is supported by a company (AvaloniaUI OU). We have been providing porting services and commercial support to our customers for over 2 years.

Image description

If you need support and guarantees please contact team@avaloniaui.net for more information.

Find us on...
Telegram: https://t.me/Avalonia
Twitter: https://twitter.com/avaloniaui
Github: https://github.com/AvaloniaUI/Avalonia
www: http://avaloniaui.net/

Top comments (6)

Collapse
 
rabbitism profile image
Bin Dong

Great job, and I can see more and more mature products adopting avalonia.

Collapse
 
florianwachs profile image
Florian Wachs

this is awesome!

Collapse
 
ihatetrains profile image
IhateTrains

Awesome! Been using Avalonia for our frontend for a while, there have been no major complaints from the users.

Why the bump from 0.10 to 11.X, though?

Collapse
 
iainrough profile image
iainrough

Any updates to support in browser and mobile on accessibility?

Collapse
 
chenjing1294 profile image
JING CHEN • Edited

When will the release version be publish, looking forward to it!

Collapse
 
hymanzhan profile image
Xucong ZHAN

This is just awesome. I am so happy about this release and thank you for your hard work!