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


Remembering Thomas Kurtz, Co-creator of BASIC
15/11/2024

Thomas Eugene Kurtz, the co-founder of the BASIC programming language, has died at the age of 96. BASIC, which was developed for the purpose of education, popularized computer programming making it ac [ ... ]



Prompt Engineering Techniques To Make You An Expert
18/11/2024

Introducing a GitHub repository full of hot tips and instructions on how to build the perfect prompt presented in a collection of Jupiter Notebooks.


More News

espbook

 

Comments




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

Last Updated ( Wednesday, 19 September 2018 )