title: Use MVVM Light's Messenger to Pass Values Between View Model
body: <p>Could someone be so kind as to explain MVVM Light's Messenger for me? I was reading a post on StackOverflow here: <a href="https://stackoverflow.com/questions/6392854/mvvm-pass-values-between-view-models">MVVM pass values between view models</a> trying to get this. The documentation on MVVM Light's not that great at this point so I'm completely unsure where to go. </p>
  
  <p>Say I have two ViewModels and a ViewModelLocator. I want to be able to pass parameters between all three without issue. How would I go about doing this with the messenger? Is it capable of that?</p>
  
  <p>Edit: Here's my new implementation. As of now, it looks as if MessengerInstance doesn't call for a token. I'm terribly confused.</p>
  
  <p>In the first ViewModel:</p>
  
  <pre><code>MessengerInstance.Send&lt;XDocument&gt;(SelectedDocument);
  </code></pre>
  
  <p>And in the second:</p>
  
  <pre><code>MessengerInstance.Register&lt;XDocument&gt;(this, xdoc =&gt; CopySettings(xdoc));
  </code></pre>
  
  <p>Could be completely wrong. Haven't gotten a chance to test it, but visual studio gets less angry with me when I do it this way. Also the MessengerInstance does register before the Message is sent.</p>