C
C#2mo ago
TJacken

Avalonia UI what I need to learn?

Hi I want to create desktop app using Avalonia I'm having experience with WinForms. I need to create application which fetch categories (simple list of Category objects class contains prop Name and IsSelected) using api and render list of categories, categories are dynamically shown (not hardcoded list). Add button which will run operation to process selected categories. Also I need to show loading indicator when I'm waiting to fetch data, when data are presented hide loader indicator. Is it good to set api call in modelview constructor? How should I handle this? If I have boolean value IsLoading how view should be triggered? Can you recommand some resouces with above questions? So I can create simple app using Avalonia 🙂
7 Replies
Buddy
Buddy2mo ago
Avalonia has a template you can start with and follow it's structure It also has a "tutorial" using Avalonia + ReactiveUI
https://docs.avaloniaui.net/docs/tutorials/music-store-app/
FusedQyou
FusedQyou2mo ago
Avalonia has been horrible in terms of tutorials lately Ever since the release of Avalonia 11 all tutorials have had gaps in them due to massive changes that have happened The listed tutorials themselves are not good either, because instead of explaining useful information they resort to explaining how to set up Acrylic Blur 🤦‍♂️
FusedQyou
FusedQyou2mo ago
@TJacken I suggest you follow the tutorial by AngelSix https://www.youtube.com/playlist?list=PLrW43fNmjaQWMhFHxS1jpQ34TkHroHJLb
FusedQyou
FusedQyou2mo ago
Note this tutorial is for Avalonia 10, and I suggest you use Avalonia 10 yourself if possible There will be a point where this tutorial ends up with big differences, mainly in template style. You can still copy paste what AngelSix wrote, or try using the new style. Is is incredibly different and the way it is set up to work can be frustrating to beginners However, apart from that it is actually a very solid tutorial apart from the fact that he ends up dragging voice input over 10+ episodes, in which case I suggest you stop watching unless you really want it
HimmDawg
HimmDawg2mo ago
I haven't been in the loop for a while, but from my experience, ReactiveUI is just so much more complicated to learn than CommunityToolkit. I'd suggest this, however the tutorials only use ReactiveUI. At least they used to
Buddy
Buddy2mo ago
Community Toolkit is pretty useless when it comes to actual functionality Making things like dialog systems together with MVVM becomes really hard
FusedQyou
FusedQyou2mo ago
Never had any issues with CommunityToolkit The tutorial also uses it It's incredibly easy to use and saves a lot of time Then again, I never used ReactiveUI because guess what; there are barely any tutorials for anyting 😄
Want results from more Discord servers?
Add your server