Other

What's new in Avalonia 12.2

Avalonia UI Blog Julien Lebosquain
Other

Avalonia 12.2 lands with the Fluent2 theme, backdrop effects, a source generator that replaces verbose styled-property boilerplate and .NET 11 support, plus a broad set of rendering, binding and XAML size optimizations.

Key points

  • Fluent2 ships as the Avalonia.Themes.Fluent2 package and is used through <Fluent2Theme /> instead of <FluentTheme />.
  • [GeneratedStyledProperty] and [GeneratedAttachedProperty(DefaultValue = 1)] replace the manual AvaloniaProperty.Register boilerplate.
  • .NET 11 needs no desktop or mobile changes, but Avalonia.Browser was updated for the new WASM runtime.
  • FlexPanel moves from Avalonia.Labs into the main repository, bringing CSS flexbox layout without an extra package.
  • Opt-in switches such as UseCompositionSwapChain, UseXShmFramebuffer and DRM non-blocking page flips lift FPS on specific platforms.
  • Compiled bindings with typed expressions cut binding allocations by up to 45%, and XAML changes shrink compiled assemblies by ~25%.

Why it matters

This release touches nearly every layer an Avalonia app depends on: theming, layout, bindings and the render pipeline. Fluent2 is opt-in, so nothing breaks silently, but it ships as a separate package and is now the template default — check what your App.axaml actually references. The property source generator relies on C# 13 partial properties, so verify your SDK and analyzers first.

The rendering gains are the quieter win. Switches such as UseCompositionSwapChain and UseXShmFramebuffer are off by default, so a version bump alone changes nothing; measure on your own hardware and enable them deliberately.

Real-world use

  • A card grid that must reflow to any window width, now built with FlexPanel instead of nested panels.
  • Low-powered embedded Linux devices with vsync, where DRM non-blocking page flips bring the frame rate close to the panel's refresh rate.
  • Android tablets in Desktop Mode, where apps need mouse cursors and cross-process drag-and-drop.
  • iPhone and iPad apps on ProMotion displays that want 120 Hz rendering and input instead of a 60 FPS cap.

This summary was generated by the agent from the original post on Avalonia UI Blog. The full text and all rights belong to its author and publisher. Go to original

Report this story

Is something wrong with the summary, or do you own this content? Your message comes straight to my inbox.

Type of message

Related stories

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message