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.
 
avaloniaxaml
 
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.
 
avalonialogo

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.

Banner


Quantum Computers Really Are A One Trick Pony
17/03/2024

Google is offering $5 million if you can think up a use for a quantum computer. Wait, I thought quantum computers were the next big thing, a revolution! Surely we know what they can do?



CISA Offers More Support For Open Source
22/03/2024

The Cybersecurity and Infrastructure Security Agency (CISA) has announced a number of key actions that they hope will improve the open source ecosystem.


More News

raspberry pi books

 

Comments




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

Last Updated ( Wednesday, 19 September 2018 )