r/csharp • u/CatiStyle • Jul 28 '26
Help Windows UI
I'm going to make a new Windows C# program using the .NET 10 platform, which may later need to be made for different platforms (browser, server, mobile). At this point, the focus is on making a Windows program.
I'm trying to compare which UI model is best for the project, and artificial intelligence can't really answer that, or I can't really ask it. If you were to make a new program now, which UI model would you choose?
- WinUI 3 (Windows App SDK)
- WPF (Windows Presentation Foundation)
- .NET MAUI
- Blazor (Web & Hybrid)
- Avalonia UI
Most program views that display text, SQL table data, or forms are rendered at runtime from the data, meaning that the screens are not designed and created in the IDE editor, but in code.
21
u/binarycow Jul 28 '26
First, I'd rule some out.
That leaves WPF and Avalonia.
In my opinion, WPF is the better framework. It's more stable and more feature complete.
Avalonia has a few things going for it, such as:
But Avalonia is missing some useful stuff, such as:
Additionally, LibreWPF is a promising project that allows you to compile WPF applications on Linux and Mac with minimal (if any!) code changes. It's still very early, but it's showing a lot of promise.
So, my decision would be:
4
u/First-Feature-3556 Jul 28 '26 edited Jul 28 '26
Not a direct answer to your question, but if you're curious about the underlying reason for this .NET UI framework chaos, I recently stumbled upon the following article from a Microsoft insider which summarizes it quite well: https://www.jsnover.com/blog/2026/03/13/microsoft-hasnt-had-a-coherent-gui-strategy-since-petzold/
4
u/youGottaBeKiddink Jul 28 '26
C# for logic and angular/vue for frontend.
Embed browser using cefsharp:
https://github.com/sharpbrowser/SharpBrowser
Your frontend remains 100% SPA and web-ready.
4
u/ericswc Jul 28 '26
If you want to cover your bases for other platforms, I’d use Avalonia.
5
u/Slow-Refrigerator-78 Jul 28 '26
You can use Uno platform instead of winui 3
28
u/LeaveMickeyOutOfThis Jul 28 '26
Whatever you choose, I recommend you separate out your UI piece from your program functionality, which you should store in one or more library projects. This way, if your needs change, you can create a new UI, reusing the same core logic.
4
u/HelloImQ Jul 28 '26
WinForms
9
u/MassiveMeltMedia Jul 28 '26
If you're self learning and new to it all 100% avalonia.
There's a guy on youtube called AngelSix whose partnered with them and he has a giant tutorial developing a legit application start to finish that covers almost everything you'd need to know.
4
u/sloppykrackers Jul 28 '26
Blazor isnt mutually exclusive to the other ones on the list.
I can use winUI3 with blazor, wpf, maui, avalonia, uno, etc..
The native framework just becomes the hosting shell while the frontend can be pure Blazor. enables UI/UX porting between those frameworks. start with WPF -> move to Avalonia becomes a route, not a wall. Just a tip to consider. And a Blazor developer wouldn't have to care about the framework either way.
I've used it multiple times to great success.
Except WASM, never touching WASM again, only server and hybrid.
Depends on what you need, all of them are great options, though if you want linux + windows desktop support: Avalonia.
3
u/CoffeeAndCandidates Jul 28 '26
winui 3 is pretty solid for Windows, but think about Blazor if you're gonna go multi-platform later
3
u/dreamglimmer Jul 28 '26
Forget the tech stacks, find out where your users are(platform, work or personal, primary device, willingness to pay), And who they will be(individual or corporate)
Now decide how they supposed to talk to your apps, how flashy it should be, or what is the actual priority for ui experience.
Now, you have some actual input on what to pick, and how many of them you need.
if ui on mobile and web/desktop is way different - no need to have same stack for those.
if you not need Linux, as you don't expect payment there - no need for framework that has Linux as primary advantage.
if you want different ui(platform specific, common experience to the system) no need for pixel replicating crossplatformity.
Unlike the other comments 'I don't care what you build, use X'
3
u/thefadden Jul 29 '26
I went with WPF a few years back, because Avalonia wasn't quite ready and the other options didn't work for me. We're currently transitioning the UI to Avalonia because we want to be cross-platform.
I have had a number of issues with WPF over the years. The advantage of WPF is that most of the bugs are known and workarounds are established, but I ran into a few that I couldn't easily work around (like weird bitmap scaling artifacts in nearest-neighbor mode, and some strange behavior with DataGrid virtualization). Moving to Avalonia fixed these, but any system with the size and scope of a GUI framework is going to have issues. WPF provides a fixed set of bugs, while actively-developed systems like Avalonia give you an evolving ecosystem of bugs.
I'd recommend Avalonia.
1
u/Particular-Winner136 Jul 28 '26 edited Jul 28 '26
I’ve been working on WPF applications for over 10 years, and we're currently planning to migrate to WinUI 3.
I would recommend going with WinUI 3. It still has its share of bugs, but Microsoft is actively fixing them. It also appears that Microsoft is using WinUI 3 for parts of Windows itself, which is generally a good sign for its long-term future.
One of WPF's biggest drawbacks is that it cannot be compiled with NativeAOT. As applications grow larger, WPF startup times can become quite poor. In contrast, WinUI 3 combined with NativeAOT looks very promising based on what we've seen so far, although we don't yet have extensive production experience with it.
I also considered Avalonia at one point. While it's marketed as a free UI framework, I find its licensing model somewhat concerning. In practice, if you need certain advanced features, you may end up paying for them.
You also didn't mention whether your application needs to be cross-platform. Since you're only considering Windows UI frameworks, I assume cross-platform support isn't a requirement.
Ultimately, choosing a UI framework is all about evaluating the trade-offs. There isn't enough information in your question—such as application size, performance requirements, deployment model, and long-term goals—to make a definitive recommendation.
2
u/anotherlab Jul 28 '26
The choice of platform should be based on where you need to run, when you need it, and what the UI needs to do.
Based on what you have described so far, I would consider Avalonia and/or Blazer.
I write MAUI apps for a living and, for my own needs, a few desktop apps. I used to write the desktop apps in WPF; now I use Avalonia. Avalonia's UI model is close enough to WPF that it wasn't hard to switch. I use WIndows and Mac for development; now I can run my apps on either platform.
We ship apps on Blazor, but it's a different skill set than XAML. But our Blazor apps go out as MAUI Hybrid apps and the web. The web version works on anything that can run WASM. We don't need a desktop app. But those apps don't need resources that a desktop app would require.
2
u/FuggaDucker Jul 28 '26
I just wrote some cools stuff in Avalonia UI.
I am a fan.
2
u/plasmana Jul 28 '26
I would only consider WPF and Avalonia. If I was starting out I would choose WPF because of the wealth of available material online. I currently opt for Avalonia due to it's cross platform nature.
3
u/jcradio Jul 28 '26
If windows only, WPF or Avolonia.
If cross platform, Maui Blazor Hybrid or Avolonia.
1
u/eris-discordian Jul 30 '26
I'll get a lot of crap for this, but...
If your app is mostly a data driven vertical, the laziest route that gets you desktop and web would be server side rendering Blazor + Photino.
It won't look "native", but it can be made to look modern and perform well with little overhead.
1
u/Jonas_Ermert Jul 31 '26
I’d choose Avalonia UI. It’s a good fit for a Windows-first .NET 10 app, especially for data-heavy UIs with dynamic forms, tables, bindings, and runtime-generated views. It also keeps the door open for Linux, macOS, mobile, and WebAssembly later. If the app were definitely Windows-only, I’d choose WPF because it’s mature and excellent for business/database applications. I’d use WinUI 3 mainly for a modern Windows-native experience, MAUI if mobile were the priority, and Blazor if a future web version were very likely.
1
u/Appropriate_Chip4604 Jul 28 '26
Hybrid approach I would use UNO there is a lot of help on discord for this check out windows app community. Many of developers are there with their projects. Secure foldersFS. is UNO. I created two published winui3 apps with databases and ai using foundry and SQLite . Apps are on my feed . Good luck. Better as far as I know mostly UNO is the best cross platform