avalonia blog

Avalonia 0.7 Release

Dan Walmsley

We are pleased to announce that Avalonia 0.7 has been released.

This is a big release and you can now build your UI once and deploy on all desktop platforms.

0.7 is an important milestone, we now recommend that Avalonia is suitable for us in production provided you are able to accept some likely small changes to API when the next version is released.

The easiest way to get started with Avalonia is to install our Visual Studio plugin and use the templates we provide there or use our .NET core templates. Check out our samples for some examples of how to get started writing an application.

There have been many bug fixes, performance optimizations and features added. Here is a list of the biggest new features:

CSS-like Animations & Transitions

#1461 @jmacato has implemented CSS-Like Animations and Transistions.

A quick example:

<Style Selector="Border.Rect1:pointerover">
        <Animation Duration="0:0:2.5"
        <KeyFrame Cue="20%">
            <Setter Property="RotateTransform.Angle" Value="45"/>
        <KeyFrame Cue="50%">
            <Setter Property="ScaleTransform.ScaleX" Value="1.5"/>
        <KeyFrame Cue="80%">
            <Setter Property="RotateTransform.Angle" Value="120"/>

New Stable OSX backend

#1977 myself (@danwalmsley) and @kekekeks have implemented a new stable backend for OSX. You will now get a highly stable and responsive app on OSX.

The new backend uses the COM interfaces, and backends for other platforms can be written natively in any language this way. If you are interested in bringing support to a new platform this way please get in touch.

Some Avalonia applications can be seen running on the new backend below: OSXApps

Custom font support

#1564 @gillibald has added support for embedded fonts and font fallbacks.

You can now declare several fonts like so:

<Window FontFamily="Segoe UI, Lucida Grande, Ubuntu" />

Font names are seperated by , and Avalonia will choose the first one available on the system.

If you embed a TTF or OTF file inside your binary as an embedded resource you can declar a font like so:

<Window FontFamily="resm:Assembly.Name.Folder.?assembly=Assembly.Name#Ubuntu" />

Where your assembly is "Assembly.Name" and you have a series of .ttf files inside "Folder" such as Ubuntu-Bold.ttf, Ubuntu-Italic.ttf, Ubuntu-Medium.ttf, etc.

OpenGL-accelerated Skia drawing for Win32/GTK/OSX backends

#1935 @kekekeks has added support for OpenGL on all platforms.

On OSX this is enabled by default. On GTK you can enable this by passing Gtk3 options to the UseGTK3 appbuilder extension method.

for example:

var result = AppBuilder.Configure<App>();

result.UseGtk3(new Avalonia.Gtk3.Gtk3PlatformOptions
    UseGpuAcceleration = true

On Windows as long as the files: libegl.dll and libglesv2.dll are either available in the system path or deployed alongside your applications binaries and you are using Skia backend (default in this release) then GPU acceleration will be enabled. Otherwise Avalonia will fallback to software rendering.

Tip: the required dlls are distributed as part of Chrome and so are readily available.

DataGrid Control

A datagrid control is now available at: https://github.com/AvaloniaUI/DataGrid

Thanks to @sdoroff for this.

Other notable changes include:

Getting started

Follow instructions here.

Special Thanks

Avalonia is only possible because of the volenteers that work on it so thanks for all the hard work of: grokys, jkoritzinsky, kekekeks, jmacato, wieslawsoltes, gillibald, donandren, sdoroff, boombuler, walterlv

The best way to support Avalonia is to get involved, implement a feature, fix a bug or help test. See contributing for information on how to get started.

Otherwise you can sponsor Avalonia financially via OpenCollective.

We hope you enjoy developing with Avalonia please let us know what you are building.