Avalonia Cross Platform .NET UI Framework
Written by Kay Ewbank   
Wednesday, 07 March 2018

The first beta of Avalonia, a cross platform .NET UI framework with XAML, data binding, and lookless controls, has been released. Avalonia can be used to develop XAML-based applications for Windows, Mac and Linux.

Avalonia uses a XAML dialect that is similar to that used in WPF, UWP and Xamarin Forms. It supports binding, MVVM, lookless controls and data templates, and has a Visual Studio plugin and a collection of  .NET core templates.

The current beta of Avalonia comes with templates for creating either bare bones Avalonia applications, or an Avalonia MVVM Application that uses the Model-View-ViewModel pattern with ReactiveUI.

While the XAML dialect is similar to that of Windows Presentation Foundation, various aspects of Avalonia differ from WPF, starting with the way styles work. Styling in Avalonia uses a CSS-like system that aims to be more powerful and flexible than existing XAML styling systems. You can have cascading and overlapping styles and selectors, and controls can have pseudoclasses; these are classes that are defined by the control itself rather than by the user. 



Avalonia binding from code works somewhat differently to WPF/UWP. At the low level, Avalonia's binding system is based on Reactive Extensions' IObservable which is then built upon by XAML bindings (which can also be instantiated in code).

The beta has a number of improvements over earlier alpha releases, including the use of Portable.Xaml as the XAML parser.
New in this release is support for deferred rendering. This avoids the need to render the entire window each time (as happened in the alphas). Instead, the deferred renderer renders to a low-level scenegraph on the UI thread which is then rendered to the window on a separate render thread.
A new Monomac-based backend for Mac OSX platforms has been added to reduce the number of binaries that are needed, and to make use of Cocoa window dialogs, which makes your app to look more native.
There's also a new previewer architecture that is intended to let the developers make designers for non-Windows platforms. The previous previewer used win32 API voodoo to re-parent the window of the application into the designer, meaning the previewer was tied to win32 and full .NET framework. The new previewer architecture uses a TCP transport protocol. This communicates between the application and the designer in a platform-independent manner. 
The developers say that the AvaloniaVS extension has already been updated to use this new protocol, and hopefully now designers for other IDEs will be coming soon.

More Information

Avalonia Website

Related Articles

How XAML Works

WPF The Easy 3D Way


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


JetBrains Integrates Gemini Into AI Assistant

JetBrains has integrated Google DeepMind's Gemini language model into its AI-powered coding tool, AI Assistant. AI Assistant will now use the combined power of Gemini and several of JetBrains' proprie [ ... ]

Pg_lakehouse Makes PostgreSQL Quack

Pg_Lakehouse from ParadeDB is an extension that turns PostgreSQL into the analytical engine of DuckDB. Why is that useful? How do you use it?

More News

kotlin book



or email your comment to: comments@i-programmer.info

Last Updated ( Wednesday, 19 September 2018 )