title: MVVM C# Logic and view in the same function
body: <p>I've a form with an image component : <code>Image</code><br>
  I would like to get real mouse position in this image.<br>
  For that I use the formule below which is located in a function</p>
  
  <pre><code>mouseXInImage = MouseXInComponent / ComponentWidth  * ImageSourceWidth
  mouseYInImage = MouseYInComponent / ComponentHeight * ImageSourceHeight 
  </code></pre>
  
  <p><code>ComponentWidth</code> and <code>ComponentHeight</code> are part of the view.
  So my question is about MVVM pattern : Where should be this function ? </p>
  
  <p>In the code behind ? (because of the view, but there are logic too)<br>
  In the view model ? (because of the logic, but there are view)</p>
  
  <p>Thanks</p>