Chapter 5. Northwind—h;Commands and User Inputs

By Ryan Vice

Getting user input from the view to the view model is one of the many challenges of implementing MVVM especially when you want to keep it pure and go with a no code-behind approach. In this chapter, we will look at how the command infrastructure helps make this task easier and where the command infrastructure falls short. We will look at several ways of dealing with the shortcomings of the commanding infrastructure, examining both code-behind and no code-behind approaches as well as looking at how the MVVM Light framework can make our life easier.

Pure MVVM

Currently, we are wiring up our event handlers in the code behind instead of taking advantage of the command infrastructure to pass ...

Get MVVM Survival Guide for Enterprise Architectures in Silverlight and WPF now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.