title: The roles of the layers in MVVM
body: <p>I know that in MVVM, we want to propagate user input from the <em>view</em> to the <em>view model</em> via data binding, and give the reflected view state in the <em>view model</em> to the <em>model</em>, where we write the business logic code, and update the user with the result via events.<br/>
  However, does it mean that every change in the view must be done outside of the xaml.cs file? <br/>
  Take for example a WPF application for <a href="https://upload.wikimedia.org/wikipedia/commons/9/91/15-puzzle.svg" rel="nofollow noreferrer">sliding puzzle</a>:<br/>
  If we want to write an algorithm to solve the puzzle,  we'll put the code in the model. <br/>
  However, assume we want to update the grid after the user clicked the down key.
  Checking if such move is possible, redrawing the board or giving the player any feedback (if the move is legit or no) should be done in the view? (the xaml.cs file) <br/>
  More generally, are there "rules of thumb" to decide what to handle where?</p>