Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

1

Q: First of all, where would I even put that interactive code? I can't do it in XML, since it requires calculation, but putting it in the ViewModel is also not correct since the ViewModel is not supposed to know about the View. Thus, do I put it in the Code of the View itself? That also seems kinda strange to me. First, why shouldn't the ViewModel know ...


1

Create a navigation service interface in the VM layer. It's up to the UI layer to actually implement this however. The VMs tell the navigation service to move to the next page or go back. It's similar to messaging, but the focus is actually navigation. Look at a framework like MvvmLight, they handle this stuff for you. MvvmLight also includes a messaging ...


0

I noticed that a lot of the code is just chained if statements depending on different states of the view. And very similar ones for different events. Such chains generally strike me as good candidates for polymorphism. So I was thinking to apply some sort of strategy pattern, where the main ViewModel has some sort of sub-ViewModels, lets call them ...


Top 50 recent answers are included