C
C#3mo ago
Hiranko

Any WPF Guides?

I'm creating desktop website of receipting system using WPF in C# Visual Studio during my internship project. I searched through various videos on Youtube and most of them are outdated or maybe I'm just confused to follow which one of them because their logic in the code is all different. I got the grasp the use of XAML and C# OOP, but not MVVM. I even bought some online course in Udemy, but they barely touch or explained the MVVM part. But do feel free to recommend anything that I should learn more about WPF that suits could my project requirements.
8 Replies
Buddy
Buddy3mo ago
A good way to learn mvvm (at least part of it) is to actually use mvvm libraries, like MVVM Toolkit But never use youtube to find quality documentation, prefer articles on the internet.
Buddy
Buddy3mo ago
Kevin Bost
IntelliTect
Master the Basics of MVVM for Building WPF Applications - IntelliTect
Master the basics of MVVM to simplify the process of building a WPF application & you'll create a more maintainable, easier to unit test app
Buddy
Buddy3mo ago
Model-View-ViewModel - .NET
Overview of the Model-View-ViewModel pattern used by .NET MAUI
Buddy
Buddy3mo ago
Also, paid courses are a scam. Don't fall for it. Learn by doing
Hiranko
Hiranko3mo ago
I see, thank you very much :catpog:
Buddy
Buddy3mo ago
While browsing docs of course.
Hiranko
Hiranko3mo ago
I agree... barely learnt anything from it...
arion
arion3mo ago
Hope I can bring some insight here. I'd recommend that during your exploration that you not use AI assisted coding tools, in many cases during learning they can hurt your experience To get to mvvm, it's basically a separation of concerns, to prevent spaguettification of code. You don't need your systems so intermingled that you can't see a difference anymore. View in its basic form is the UI (User interface) or the UI layer (some code that gets used by the UI) The model is a bit complicated since it encompasses many things but basically it's something that isn't connected to your UI. Ideally it's something like a DTO. View Model in its basic form connects well, the view and the model. It's the code that makes the model compatible with the UI, most of your app's code should live in these (except of course the XAML) Try looking at other people's projects that use MVVM and had a lot of stars on their GitHub (I'm hoping that many stars means they use MVVM correctly) Essentially, MVVM ensures that your code can easily be repurposed for other things.