Try Flutter, You Won't Be Disappointed
I faced the same dilemma as you - choosing the right framework for my next project.
I evaluated numerous options, finally deciding on Flutter: it was a game-changer!
The development speed and stunning visuals it offers for both desktop and mobile applications are truly remarkable.
Even for a seasoned programmer like myself (who loves C/C++!), the learning curve for Flutter was surprisingly quick.
Adding to the already plenty solutions, I've asked myself this question recently.
For a customer, I need to replace old VB6 applications throughout a factory.
Web isn't an option as I need to communicate with hardware on the machines (although that hardly seems an issue now that we're working on it...).
Anyway, an obvious contender would be WinForms, but as you said, that's dying.
Microsoft ported WinForms to .NET, so it isn't actually dead yet, but I wanted the new software to be modern.
So then WPF (Windows Presentation Foundation) could be the logical successor, since that's also ported to .NET.
However, WPF is XAML, and as you said, that's like pulling teeth.
So we'd be pulling teeth in an old framework that was only recently ported to keep some grumpy old developers happy (I guess).
I've seen UWP (Universal Windows Platform) mentioned here, but Microsoft already officially dropped support for it so this isn't even an option anymore!
However, UWP used WinUI 2 under the covers and WinUI 3 is the official successor that's also still supported.
It's XAML, but at least it's modern!
Looking outside the Microsoft stack, we have more web-based solutions, like Flutter and Uno Platform.
Two stood out for me, which are really alternatives to Flutter and Uno respectively, Electron and Avalonia UI.
Visual Studio Code was built using Electron, so you get an idea of what it can do and how it can look.
It uses web-based technologies, like HTML, CSS and JavaScript and somehow compiles(?) them as cross-platform desktop applications.
Avalonia UI uses XAML (in fact, it's considered the spiritual successor to WPF), but also produces cross platform desktop applications.
If your choice comes down to Avalonia UI or Uno, Avalonia is the clear winner with a larger community on GitHub.
As a plus, the Avalonia team has (ex-)developers from the WPF team!
My problem with these technologies, while they seem to work and look great, is that they aren't native applications, meaning they do their own drawing instead of leaving that to the operating system.
The result is that they can look and feel like they're not desktop/Windows/Apple applications at all.
Ultimately, I went for .NET MAUI.
.NET MAUI is the successor to Xamarin, which is of course a mobile framework.
However, .NET MAUI can create cross platform apps that work on mobile and desktop!
In theory, at least, because in practice you're going to face plenty of challenges.
.NET MAUI, like Xamarin, uses XAML too.
So why did I pick .NET MAUI?
We're only targeting Windows for now and for Windows it compiles to WinUI 3, which are native windows apps.
WinUI 3 has more options as it doesn't have to work for mobile as well, but .NET MAUI is the latest greatest and I already foresee some mobile work in the future as well.
That said, .NET MAUI is a bit of a gamble as well, since Microsoft doesn't seem to update it all that well and for some serious bugs in .NET 7 simply said "you'll have to wait until .NET 8 because we're not patching .NET MAUI for .NET 7."
As a result, lots of Xamarin developers haven't embraced .NET MAUI and are looking for alternatives.
So far it's looking pretty good for us though, I just hope both Microsoft and the community will embrace it a bit more.
Last, but not least, you can use .NET MAUI with Blazor, which allows you to run a web app (HTML, CSS and JavaScript mixed with .NET) on your desktop in a .NET MAUI shell app.
It was a serious consideration, but quite frankly I didn't want to be bothered with web technologies either, and it won't compile as a native Windows app either.
Figured it all out earlier this year, so consider this the summary of my research.
[Add]
To answer the question of how to deal with XAML, it's not that different from HTML, is it?
Just suck it up I guess.
[/Add]
Updated 8-Feb-24 1:36am
v2
It's been agessss since I posted here but I came here on a whim this morning and saw this question & it caught my attention
As others above have said, Avalonia, .NET MAUI, and WinUI 3 are all decent options. I also find (found?) writing XAML to be like a trip to the dentist. The amount of fracture in the ecosystem since WinForms's heyday is a testament to how difficult it is (in my opinion) to recreate its superior developer UX. I wish that WinForms had been incrementally improved, not replaced with XAML-based solutions.
I'll throw another option into the ring:
GitHub - picoe/Eto: Cross platform GUI framework for desktop and mobile applications in .NET[
^]
I built some hobby projects with it a few years ago and found it to be a surprisingly pleasant experience.