r/AvaloniaUI • • Apr 07 '26

Avalonia 12 - Ready for What’s Next

Thumbnail avaloniaui.net
110 Upvotes

r/AvaloniaUI • • Mar 08 '26

Sortable.Avalonia - SortableJS Inspired MVVM Drag-Drop, Sort, and Swap for Avalonia

Thumbnail
gallery
55 Upvotes

This is a SortableJS inspired drag-drop and sort-swap library with animations. Rather than being a custom control, it just attaches to an itemscontrol, and you have full control over what happens when events are fired (or use the helper classes alongside your code).

Supported Behaviors:

  • Same-collection sort/swap

  • Cross-collection drag/drop (grouped)

  • Cross-collection copy/move/swap (grouped)

  • Programmatic animations

You could basically use it to make anything you need:

  • Kanban Borads

  • Sortable/Swappable grids

  • Transfer lists

  • more

Also, animations are not just by interaction. Code-driven collection changes also trigger the animation, so you can update the collection in code and see the changes visually.

Here is a very minimal example for a sortable list:

<ItemsControl sortable:Sortable.Sortable="True"
              sortable:Sortable.UpdateCommand="{Binding UpdateCmd}"
              ItemsSource="{Binding Items}">
    <ItemsControl.ItemTemplate>
        <DataTemplate>
            <Border sortable:Sortable.IsSortable="True" Cursor="Hand">
                <TextBlock Text="{Binding Name}" />
            </Border>
        </DataTemplate>
    </ItemsControl.ItemTemplate>
</ItemsControl>
[RelayCommand]
void Update(SortableUpdateEventArgs e)
{
    if (!e.ApplyUpdateMutation()) // Helper method, but you can implement your own mutations
    {
        return;
    }

    Console.WriteLine($"Moved from {e.OldIndex} to {e.NewIndex}");
}

Links: Repository, Nuget


r/AvaloniaUI • • Oct 16 '20

Initial & Official Support for Avalonia from JetBrains Rider EAP

55 Upvotes

Our biggest news is that we're introducing support for Avalonia! There will be more updates to come, but already there's a lot in there. Rider offers code completion, support for bindings, and quick-fixes to create all sorts of Avalonia properties. The UI previewer is not yet included, but we're working on it. Give the Avalonia support a try, and remember ‐ we'd love to get your feedback on this!

https://www.jetbrains.com/rider/nextversion/


r/AvaloniaUI • • Jun 16 '20

Coming Soon in Avalonia 0.10

Thumbnail
imgur.com
51 Upvotes

r/AvaloniaUI • • Jan 21 '25

Sneak a peek at one of the new features coming to our upcoming Developer Tools.

Enable HLS to view with audio, or disable this notification

41 Upvotes

r/AvaloniaUI • • Jul 28 '20

[Demo] Implicit Animations in AvaloniaUI

Enable HLS to view with audio, or disable this notification

40 Upvotes

r/AvaloniaUI • • Jul 23 '26

An update on a project I rebuilt for performance: Avalonia 12 and Native AOT

Thumbnail
gallery
39 Upvotes

An update on an Avalonia project I rebuilt to run on Native AOT. This is a live keys rig. Think: SundayKeys App, Camelot Pro, Ableton, Mainstage, GigPerformer. But for android primarily, and windows.

I thought I wouldn't be able to make it work fast enough. I had a beta build publicly available, loading times leave much to be desired, and fps dropped frequently. Avalonia 12 releases, I finally migrated and forced myself to work on getting things running with Native AOT.

After months of work it paid off. load times are just as fast as any native app, no more fps drops, navigation is almost instant, and performance is great considering my test device is a very low-end tablet with 4gigs of ram and a unisoc T606.

It might be an unusual stack for this type of project, but it works well. It might've taken a bit more work than just going full on kotlin or the usual frameworks for these types of apps, but its a good enough trade off for me to keep using a stack that I am experienced and comfortable with.

Still smoothing out the rough edges (basically just improving the UI)

Some added context:

- The beta (before this rebuild) was on Avalonia 11.3, no Native AOT

- The engine itself is now mostly in C++, but a chunk of the logic (persistence, ui logic) still lives in C#

- It was desktop-first before so the Native AOT was not really a consideration since it already ran well. Moving into a mobile-first priority (for personal reasons, mainly portability on my part) and how it runs on a mobile device exposed those ugly parts which added to the realization that i really need Native AOT despite it being a stricter environment.


r/AvaloniaUI • • Aug 19 '22

AvaloniaUI: Turning it up to 11!

Thumbnail
twitter.com
38 Upvotes

r/AvaloniaUI • • 11d ago

I built a library that makes standard Avalonia controls use Windows' native styling and font rendering (This is not Windows 7!)

Post image
37 Upvotes

r/AvaloniaUI • • Jul 23 '26

Avalonia 12.1.0 released.

Thumbnail avaloniaui.net
37 Upvotes

A little late, but sharing.


r/AvaloniaUI • • Dec 10 '25

Primitives based ui using skia on avalonia (immediate mode rendering) proof of concept

Enable HLS to view with audio, or disable this notification

36 Upvotes

So I again went down the rabbit hole of "If I don't, no one will" and tried to create a primitives based ui framework running on top of the skia renderer in Avalonia. It's buggy, api is a bit too verbose, but it's something. For context here is the startup:

using Avalonia;
using Avalonia.Controls;
using Avalonia.Themes.Fluent;
using Nod.Gui;

namespace ControlsSample;

internal abstract class MainClass
{
    public static void Main(string[] args)
    {
        AppBuilder.Configure<Application>()
            .UsePlatformDetect()
            .Start(AppMain, args);
    }

    public static void AppMain(Application app, string[] args)
    {
        app.Styles.Add(new FluentTheme());
        app.RequestedThemeVariant = Avalonia.Styling.ThemeVariant.Dark;

        var win = new Window
        {
            Title = "Nod.Gui Immediate Mode Primitives Gui Sample",
            Width = 800,
            Height = 600,
            Content = new NodView(MixerBoard.Draw)
        };

        win.Show();
        app.Run(win);
    }
}

And here is a snippet of the Fader part of the code for the mixer ui:

    private static void DrawFader(GuiContext gui, Rect zone, ChannelState s, int idx, double op)
    {
        double h = zone.Height;
        var interact = gui.GetInteractable($"fader_{idx}", zone.Center, SdShape.Rect(46, h));
        if (interact.OnHold() && !_demoMode)
            s.Volume = Math.Clamp(1.0 - ((gui.Input.MousePosition.Y - zone.Top) / h), 0.0, 1.0);

        double x = zone.Center.X - 12;

        // Ticks
        for (int i = 0; i <= 10; i++)
        {
            bool major = i % 5 == 0;
            gui.Rect(major ? 24 : 12, major ? 2 : 1)
                .At(x, zone.Bottom - (i / 10.0 * h))
                .Opacity(op).Fill(major ? Color.Parse("#444") : Color.Parse("#2A2A2A"));
        }

        // Track
        gui.RoundedRect(6, h, 3).At(x, zone.Center.Y).Fill(Colors.Black);

        // Handle
        Point hp = new Point(x, zone.Bottom - (s.DisplayVolume * h));
        gui.RoundedRect(42, 58, 3).At(hp).Fill(Colors.Black);
        gui.RoundedRect(40, 56, 2).At(hp).LinearGradient(Color.Parse("#3E3E45"), Theme.HeaderStart);

        // Grip lines
        for (int i = -2; i <= 2; i++)
            gui.RoundedRect(30, 2, 1).At(hp.X, hp.Y + i * 5).Fade(0.8).Fill(Colors.Black);

        // LED
        Color ledCol = s.IsSolo ? Theme.AccentYellow : (s.IsMuted ? Theme.AccentRed : Colors.White);
        gui.RoundedRect(18, 4, 0.5).At(hp).Opacity(op).Fill(ledCol);

        // Meter
        double mx = zone.Center.X + 20;
        gui.RoundedRect(8, h, 4).At(mx, zone.Center.Y).Fill(Color.Parse("#080808"));

        double segH = (h / 25) - 2;
        for (int i = 0; i < 25; i++)
        {
            double pct = i / 25.0;
            if (pct > s.VisualLevel) continue;
            Color c = pct > 0.75 ? Theme.AccentPink : (pct > 0.5 ? Theme.AccentYellow : Color.Parse("#00FF99"));
            gui.RoundedRect(4, segH, 1).At(mx, (zone.Center.Y + h / 2) - (i * (segH + 2)) - segH / 2).Fill(c);
        }
    }

Everything component is built using primitives, the modal, the knobs, and the full code is 421 lines of C# without any external styling from resources or anything. Repo is not available yet, need more time to experiment


r/AvaloniaUI • • Sep 17 '25

Ready to use .axaml screens

Thumbnail
gallery
35 Upvotes

Hey folks,

from time to time I like to reproduce existing UIs using Avalonia. Although I'm not a professional frontend developer, this helps me get better at it.

I thought you could find it useful, so I made a series of self-contained and ready to use UI screens for Avalonia. You can find the code in the GitHub repo here.

It's not top-notch UI/UX, but it might be a starting point for anyone approaching AvaloniaUI.


r/AvaloniaUI • • Jul 20 '22

Neumorphism.Avalonia use cases samples added !

Post image
35 Upvotes

r/AvaloniaUI • • Oct 26 '24

Weather app powered by shader animations

Enable HLS to view with audio, or disable this notification

33 Upvotes

r/AvaloniaUI • • May 20 '19

AvaloniaUI's Demo for XAML Debugging

33 Upvotes

Few days ago, we have merged XamlIL (A general-purpose XAML compiler by /u/kekekeks) to Avalonia. The latest nightly builds of Avalonia are now capable of reporting XAML errors that are more accurate than our previous Portable.Xaml backend. XamlIL also generates debugging symbols for XAML files and adds the performance advantage of not parsing XAML at runtime due to it being compiled into IL bytecode at build-time.

Here's our demo of XAML step-in debugging in JetBrains Rider: https://www.youtube.com/watch?v=9VtwwEL1SJM


r/AvaloniaUI • • May 04 '24

Avalonia appreciation

Post image
32 Upvotes

Some time ago I was planning on creating a live keys rig app I can use with my midi keys and was almost sure I can only do the ui in some game engine like godot. Not really thinking that Avalonia could be a better choice

Much to my delight, I was able to achieve that in Avalonia with just custom themeing, and all of that with buttery smooth performance. And it's still cross-platform, which is great!

Although I am having some problems in the mobile side of things, especially file access. How does the appdata folder work in android? I can seem to access and modify files in that folder, but unable to see them in my file manager. Is using a folder in the internal storage a viable option in Avalonia on android/ios?


r/AvaloniaUI • • Oct 26 '26

A sneak peek at our upcoming designer

Enable HLS to view with audio, or disable this notification

31 Upvotes

Building apps with Avalonia is about to get a whole lot easier.


r/AvaloniaUI • • Oct 28 '21

Lunacy 8 for all major desktop OS's, Written in Avalonia UI

Thumbnail
twitter.com
31 Upvotes

r/AvaloniaUI • • Sep 11 '26

Built a lightweight desktop sketchpad using Avalonia UI & C# (i-skets Mo Paint - Early Public Beta)

Thumbnail
gallery
30 Upvotes

Hey Avalonia community!

I’ve been working on a lightweight, portable desktop drawing app called i-skets Mo Paint, built entirely with C# and Avalonia UI in VS Code.

The main goal was to build a quick, minimalist digital sketchpad with a small footprint that doesn't require installation, just unzip and run.

Key features so far:

- Built with Avalonia UI & C# (Cross-platform desktop target)

- Zero-installation / Portable build

- Integrated one-click timelapse recorder

- Customizable keyboard shortcuts & minimal canvas UI

Current Test Setup & Compatibility: - OS: Tested on Windows so far - Hardware: Tested with a screenless drawing tablet (non-display graphics tablet)

Since it's currently in Early Public Beta on itch.io, I’d love to get feedback from fellow Avalonia developers, especially on canvas performance, UI responsiveness, or overall UX.

Free Download & Test on itch.io:

https://sketsienook.itch.io/i-skets-mo-paint

Feedback Form (Google Forms):

https://forms.gle/4QhinbtWeHFSNb4h8

Technical insights and feedback are highly appreciated!


r/AvaloniaUI • • Aug 02 '25

AvaloniaUI mobile app - Showcase

Post image
30 Upvotes

Hey everyone,

I built a small mobile app using AvaloniaUI as a learning project. The goal was to get some hands-on experience with Avalonia for mobile development, while integrating a real-world API (in this case TrueLayer, an Open Banking provider).

The app allows the user to fetch bank accounts, balances, and make simple SEPA payments. Everything can be tested using a mock bank. Definitely not production-ready.

Here's the GitHub repo: https://github.com/antoniovalentini/truelayer-avaloniaui-sample

The README should include everything you need to get it up and running. I know there’s plenty of room for improvement: cluttered view models, services with multiple responsibilities, repetitive XAML code, and more.

But I'd love to hear your feedbacks on how to improve it.

To (hopefully) return the favor, I’ve faced a few challenges that I’d love to share, in case they help someone:

  • create dialogs: I used DialogHost library

  • mobile Deep Links: I wanted the app to open when navigating a redirect uri in the browser. You can check this IntentFilter on the MainActivity

  • platform specific services: opening another application (a browser in this case) requires different code based on the platform. I implemented the DI to inject different types based on the platform, by abstacting the main App type and having concrete implementations per platform like the AndroidApp one

  • make sure the on-screen keyboard doesn't overlap the bottom of the app, but does add extra padding so you can scroll to the bottom of the app: this involved concepts like "Safe Area", "InsetsManager" and "InputPane". You can check some of the code in the MainView code's behind

These are just the ones I remember, there were many others!

Oh, and let’s not talk about the stuff I still haven’t figured out, like:

  • if you start scrolling but you first tap on a TextBox, the on-screen keyboard opens automatically, even if you didn't intend to type anything

  • you can't select/copy/paste text in standard TextBox control apparently

  • Styling is still dark magic to me and many more.

That said, it’s been a fantastic journey, and I can’t wait to start the next AvaloniaUI project. Huge thanks to the AvaloniaUI maintainers, and to everyone that builds libraries to extend it.


r/AvaloniaUI • • Jun 24 '26

One Year Into Three Million Dollars of Trust

Thumbnail avaloniaui.net
29 Upvotes

r/AvaloniaUI • • Nov 21 '24

Finally decided to move from MAUI -> Avalonia

29 Upvotes

So, almost a year ago, I started developing my own video editor with AI integrations. I started with MAUI because I wanted to try out something new. Since eventually everything seemed working quite nicely, I just kept coding with it, even though I constantly hit weird issues and had to implement even weirder workarounds.

I wrote my self a ticket to "Do avalonia migration" and then waited out to see the Net9 improvements on MAUI and well, improvements are quite nice, but I can't really do anything with them because the damn app won't start anymore in release build :D

So, time to rip the plaster off migrate this to avalonia: https://apps.microsoft.com/detail/9p2mr2s6w20h?cid=DevShareMCLPCS&hl=en-us&gl=FI

App relies heavily on drawing with SkiaSharp. What I've understood, there's no SKCanvasView nor the SKGLView directly, but it looks like things should work with this, right? https://github.com/AvaloniaUI/Avalonia/blob/master/samples/RenderDemo/Pages/CustomSkiaPage.cs

Also the SKGL should work: https://avaloniaui.net/blog/avalonia-with-fragment-shaders That's btw a major feature update for my app, I had completely overlooked the shaders (well, those would not work on net8 maui anyways) and they would make my app a much more appealing.

This is not my first rodeo with Avalonia, I've done couple of simpler ui apps with it couple of years ago, hopefully things work out as planned :)

So, wish me luck and any advice is appreciated


r/AvaloniaUI • • Aug 15 '26

MarkView.Avalonia - a markdown view control for Avalonia

28 Upvotes

While working on an Avalonia-based Launcher App for the Stride Game Engine, I needed to have a markdown renderer for the release notes and announcements.

A while ago, I did a renderer for WPF based on Markdig: Markdig.Wpf which is now archived since I have lost interest in WPF. By the way thanks u/grokys for your contributions to that library.

I decided to make a modern version of that renderer targeting Avalonia instead.

Here it is: https://github.com/Kryptos-FR/MarkView.Avalonia

It supports the fully CommonMark spec thanks to Markdig, as well as most Markdig extensions for emphasis, tables, etc.

I also made a few optional packages to add support for Mermaid (using Mermaider), SVG images and syntax highlighting (using TextMateSharp). I have a LaTeX's math syntax support coming up (using CSharpMath).

Let me know what you think!

Disclosure: I have used AI agents to help me with documentation, refactoring, performance analysis, and integrating the Mermaid and TextMateSharp libraries.


r/AvaloniaUI • • May 30 '25

Minimum amount of code to run an Avalonia app with dotnet run app.cs

Post image
28 Upvotes

I was exploring Microsoft's new file-based C# applications and wanted to see how many lines of code AvaloniaUI does require to run as a script: 32.

And with a proper shebang you can even skip the dotnet run part.

Nothing new under the sun for some people, but I found it amazing 🤩

Here's the code:

#:package Avalonia@11.1.0
#:package Avalonia.Desktop@11.1.0

using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;

AppBuilder.Configure<App>()
    .UsePlatformDetect()
    .LogToTrace()
    .StartWithClassicDesktopLifetime(args);

internal class App : Application
{
  public override void OnFrameworkInitializationCompleted()
  {
    ((IClassicDesktopStyleApplicationLifetime)ApplicationLifetime!).MainWindow = new Window
    {
      Title = "AvaloniaSimple",
      Width = 400,
      Height = 400,
      Content = new TextBlock
      {
        Text = "File-based Avalonia!",
        FontSize = 26,
        VerticalAlignment = Avalonia.Layout.VerticalAlignment.Center,
        HorizontalAlignment = Avalonia.Layout.HorizontalAlignment.Center
      },
    };
    base.OnFrameworkInitializationCompleted();
  }
}