Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Avalonia UI v11 Release Candidate 1: Breaking Changes and API Stabilization

Avalonia UI v11 Release Candidate 1: Breaking Changes and API Stabilization

At the end of last month, the Avalonia UI team made an announcement regarding the anticipated version 11. The team revealed the availability of the first Release Candidate (RC) for this significant release. In their official release post, they emphasized the significance of this milestone, as it signifies a crucial step forward for the project. The primary focus of this RC is to stabilize the API, bringing the final release of v11 even closer to completion.

Avalonia UI is an open-source and cross-platform UI framework for .NET developers, designed to facilitate the development of desktop applications that can run on Windows, macOS, Linux, iOS, Android, and WebAssembly. Correspondingly, last month, InfoQ also interviewed Mike James, the current CEO of the company, which readers can read and get more insights into the Avalonia UI platform.

Avalonia UI v11 places a keen focus on maintainability and incorporates the most substantial changes to the API in its history, ensuring a promising future for the project. As stated in the release post, extensive thought, time, and resources have been invested in guaranteeing that changes pave the way for a more robust and reliable Avalonia UI. While this release introduces the most significant breaking changes thus far, the team behind the Avalonia UI anticipates that future major releases will include far fewer alterations to the API.

The official blog post of the release, states the following:

This RC marks a significant milestone for us as it stabilises the API. It's been a journey of intense work, learning, and collaboration. And now, we can confidently say that we're closer than ever to the final release of v11

As part of these breaking changes, certain previously public classes have been transitioned to an 'Internal' designation. The adjustment has been made in order to protect the integrity of applications by allowing for modifications to implementations without introducing future breaking changes. Although some measures have been taken to ensure a smooth transition, it is acknowledged that there may be instances where critical classes are no longer visible. In such cases, developers are strongly encouraged to contact the Avalonia UI team for assistance. They are open to a dialogue regarding the possibility of restoring public visibility to certain classes based on valuable user feedback.

In addition to this release of the Avalonia UI v11 Release Candidate, developers and users alike can find a lot of community feedback and valuable insights on the project's GitHub discussion page. Developers shared their experiences, offered suggestions, and seek assistance with migration and troubleshooting related to the RC release. To gain a wide understanding of the various perspectives surrounding the Avalonia UI v11 RC release, it is highly recommended for users dive into the comment section on the mentioned GitHub discussion page.

Besides the GitHub discussion page, the GitHub wiki page is called Avalonia 11 Porting Guide. This porting guide provides detailed instructions and recommendations on adapting existing codebases to leverage the new features and improvements introduced in version 11. It covers various aspects of the migration process, including breaking changes, API modifications, and best practices for a smooth transition.

According to a porting guide following changes are included, the framework has removed its dependency on System.Reactive. For developers who are utilizing reactive features, it is necessary to include a package reference to System.Reactive in your project. Also, the IStyleable interface has been deprecated, developers can read more about this on the related GitHub issue. Additionally, view in the form of .axaml/.axaml.cs (or .xaml/.xaml.cs) pairs now come with automatically generated C# code.

Furthermore, ItemsControl and its derived classes such as ListBox and ComboBox now possess both an Items property and an ItemsSource, similar to the WPF/UWP framework. Moreover, the IAssetLoader interface is no longer available, and it is advised to use the static AssetLoader class instead. Also, the virtual AvaloniaObject.OnPropertyChanged method has been modified to be non-generic.

Other notable changes are included with building elements like events, layout, focus, visual tree, rendering and many more, so it is highly recommended to take a look at the already mentioned Avalonia 11 Porting Guide.

The Avalonia UI team extends their invitation to all users to try out the RC, provide feedback, and contribute to making Avalonia UI v11 the best it can be. They express sincere gratitude to their users, contributors, and the entire Avalonia community for their continuous support.

Lastly, to get started with Avalonia UI v11 RC, users can download the Nuget package and also interested readers can learn more about Avalonia UI and get started exploring the official documentation and main Avalonia GitHub repository.

About the Author

Rate this Article