Use the mvvm [0] toolkit, it is good! That way you decouple your view (<= gui toolkit) from your (view)model.
It works with Avalonia, WPF and should work with Winui3, Uno etc too. Avalonia is being used by some pretty impressive applications btw, check that one out too. (I have no affiliation).
Avalonia (+ .net) is the reason why I think that is the best stack for any desktop application or util, because utils eventually gain a gui. Imho a far better choice than Python or JS in most cases.
As an aside, I don't understand why the Java players do not put more emphasis on JavaFX. Would be the ultimate choice for people that are wary about the MS affiliation.
___
0. https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mv...
CommunityToolkit.MVVM is great!
Had a chance to compare both Uno and Avalonia and I choose Uno any day. Mostly because of the breadth of what they have. Their Navigation "Extensions", Authentication, Toolkit controls, and their Hot Reload is awesome.
Now the fact they announced a Drag&Drop Designer seals the deal.
Been trying to use VS Code more and more with Uno and it works great.
I see Avalonia has having a decent Desktop offering but I target Mobile and Web and they're nowhere where Uno is.
Interesting. Here someone comes to the opposite conclusion after using both intensively [0], where they found that avalonia is a superset of uno in features, and that uno is tied to the UWP & WinUI API for the windows target. Maybe things have changed in between?
What is your feel about the web target? The ux and feel of these Canvas blobs are poor across all toolkits imho. Do you use it as an internal web app that is used like once every day?
___
0. https://www.codeproject.com/Articles/5366945/Multiplatform-X...
Uno doesn't use MAUI. It's either WinUI or Skia-based, just like Avalonia.
Uno also doesn't use Canvas on Web, it uses the DOM. I use it for an enterprise Web App, not a public website.
I feel Nick been pro Avalonia forever as far as I can tell and the pace at which am noticing Uno innovating, one year might make all the difference in the world.
In all cases, I made my mind by testing both and I just had a way better experience with Uno, everything available out of the box, the tooling is above and beyond.
Anyways, just wanted to share by point of view, typically don't contribute here.
I thought Avalonia was not WinUI based, giving Avalonia more freedom an consist platform behaviour.
Thanks for sharing, appreciated.
Sorry, I meant Uno is either WinUI or Skia, they have both. Their Skia is same as Avalonia.
> Avalonia is being used by some pretty impressive applications
Like this implementation of Visual Basic 6: https://bandysc.github.io/AvaloniaVisualBasic6/
How does Avalonia do native look-and-feel? Does it use its own custom controls (with themes) or does it try to do what Qt does (using native theming APIs)?
Avalonia draws its own controls and supports themes.
In contrast, Uno uses native controls as much as possible.
Uno Platform Dev here.
Uno currently uses some native controls on mobile iOS/Android/Catalyst (text input, mostly) to provide platform features, but the rest is rendered using graphics primitives. On Web, the same happens where CSS is used for most of the rendering. Input interactions are managed entirely by Uno. This allows to have a visually identical UI across platforms, unless the developer chooses otherwise.
On Desktop targets, Uno is rendering everything on an HW accelerated Skia canvas, with GL/Metal backends.
So does that mean you do not use winui calls anymore, but like Avalonia share the same implementation of controls across Linux and Windows?
See the diagrams from here to see what I mean: https://www.codeproject.com/Articles/5366945/Multiplatform-X...
Uno Platform is a cross platform implementation of the WinUI+WinRT APIs. That cross-platform implementation never used the official WinUI/WinAppSDK implementation on Windows.
When running on Windows, which this is where some confusion may lie, you can choose to use the Uno implementation (the netX.0-desktop TFM), or the original WinAppSDK by Microsoft (the netX.0-windows10.YYY TFM), since both implementations share the same API, making user code compatible with either ones.
On the other platforms, Wasm/Linux/iOS/Android/Catalyst/macOS, only the Uno implementation can be used.
Qt does custom drawing of controls as well. wxWidgets uses native controls.
C# and Uno, C# and Avalonia (https://avaloniaui.net/), Dart and Flutter (https://flutter.dev/) are all interesting options for WebAssembly application development. It's nice to be able to do cross platform desktop applications that can also be compiled for web delivery.
For web assembly the .NET ecosystem also has Blazor.
Note that Blazor has serious deployment problems since ~2021 [0] due to MS picking some idiotic packaging format defaults.
I.e. Let's make it look like a Windows executable! And go ahead and name it .dll! I'm sure no default firewall settings will have an issue with that.
So any wide Blazor app deployment also requires overriding the default packaging and adding obfuscation.
Supposedly that's experimentally fixed in NET 8... [1]
[0] https://github.com/dotnet/aspnetcore/issues/31048
[1] https://github.com/dotnet/aspnetcore/issues/36978#issuecomme... https://github.com/dotnet/runtime/issues/80807
This was fixed in .NET 8 with WebCIL. Uno Platform since .NET 9 is also using it.
Kind of cool. Since I didn't work on mobile and desktop apps for quite some time, I wonder where Uno stands when compared with MAUI.
Hot Design is one-of-a kind, for Uno Platform only.
Also, there are lots of reasons why one may chose Uno for the next project https://platform.uno/docs/articles/concepts/overview/why-uno...
Related:
Uno: Create Beautiful Cross Platform .NET Apps Faster - https://news.ycombinator.com/item?id=40231624 - May 2024 (147 comments)
Why Microsoft doesn't work on WinUI GUI designer?
Unclear why. But it is not uncommon for Microsoft to leave 'holes' in their offering soo that the partner network can fill them. Over 90% of Microsoft's revenue is partner-delivered. This often sparks great innovation outside of Microsoft walls.
Uno Platform promotes the use of .NET, so is therefore a tech-partner to Microsoft.
And with Hot Design (https://platform.uno/hot-design/) Microsoft's .NET Ecosystem becomes richer for a tool that no other developer ecosystem has. It is A RUNTIME VISUAL DESIGNER for .NET Apps. It turns the App you are developing into a Visual Design surface you can drag-and-drop components on, data bind,etc.
Idk, but I think they burried themselves under a load of GUI frameworks.
Windows Forms is good, but limited. WPF is almost perfect, but Avalonia is like that + cross platform.
The other ms gui frameworks are a waste of time, skip those.
I think Microsoft stands behind MAUI.
But since they pivoted to cloud, web AI and they don't profit too much from people building desktop and mobile apps, I guess Microsoft won't invest much resources into MAUI or any GUI toolkit.
They probably are working on one all the time but they scrap it when starting a new framework…
[dead]
While competition can be good sometimes, I am not convinced it's a good thing when it comes to GUIs. See Linux desktop fragmentation.
In the .NET community we have the ideea that should be one tool for one job, one library, one framework etc. Now for Gui we have Avalonia, Uno and MAUI which can lead to fragmentation, noise and clutter and can reduce code reusing.
It would be nice if most people will pick one tool and stick to that.
Competition is always good, especially when healthy and productive. See any industry, why would software be any different.
Especially when there is also collaboration. Uno team collaborates quite a bit with .NET, Visual Studio and MAUI teams.
> In the .NET community we have the ideea that should be one tool for one job, one library, one framework etc.
xUnit, NUnit, MSTest
Autofac, Ninject, Microsoft.Extensions.DI
Quartz, Hangfire
Yes, there are multiple tools but for each task there is a dominant tool. That is my impression.
A "dominant tool" is the one Visual Studio sets default for installed workflow package
Yeah, there are some categories with choices, but 9/10 use cases the .net ecosystem is Trader Joes.
> In the .NET community we have the ideea that should be one tool for one job, one library, one framework etc.
I've been a .NET developer for 20 years. This is not true.
Most people used EF for ORM, Newtonsoft for JSON, Automapper for object mapping built-in DI container for dependency injection, XUnit for tests, Fluent Validation for validation, ASP.NET WebApi for web applications, ASP.NET MVC for websites and so on.
What about WinForms? Afaik, that's been the only Windows GUI framework wth long term support. /s