Code-Behind or MVVM #1868
Replies: 3 comments
-
In my opinion, the right architecture depends on your app’s complexity and how much data flows through it.
Note It’s not just a choice between code-behind and MVVM. There are other valid approaches. For example, the WinUI Gallery app doesn’t strictly use either. So the real question isn’t "Should I use MVVM or not?" |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your response. |
Beta Was this translation helpful? Give feedback.
-
Usually, I implement my apps using MVVM. However, this doesn't mean that there won't be any code-behind. My approach is to separate the projects. For example: ToDo (WinUI 3 Project)Views, all UI-related components or anything requiring the ToDo.Core (C# Class Library Project)ViewModels, Models and other core logics belong here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi !
I'm beginner WinUI dev and I have a question.
I'd like to know when I should use pure MVVM versus code-behind for my WinUI projects.
Thanks in advance if someone responds !
Beta Was this translation helpful? Give feedback.
All reactions