title: Two views - one ViewModel
body: <p>I must have misunderstood the concept of <code>ViewModels</code> and Views. But at this moment I can't rebuild the application from ground and this time doing it better. My situation is that I have a view where the user can load files and read them, a plotter shows the graphs and some operations are implemented. I want to be able to generate reports (like summary) of the data but I want it in other view. I'm using <a href="http://mui.codeplex.com/" rel="nofollow">ModernUI</a>, this other view is in another tab. </p>
  
  <p>What I want is have that two tabs synchronized, when I load a file in the "plotter tab", the file must be loaded in the other view too. For that I think what I need is to bind the view to the same <code>ViewModel</code>, where I have for example <code>LoadedFiles = List&lt;File&gt;</code>, so I will be able to achieve it. The problem is that if I bind it either</p>
  
  <pre><code>MainViewModel vm = new MainViewModel();
  DataContext = vm;
  </code></pre>
  
  <p>or in XAML</p>
  
  <pre><code>&lt;UserControl.Resources&gt;
  &lt;UserControl.DataContext=local:MainViewModel/&gt;
  &lt;/UserControl.Resources&gt;
  </code></pre>
  
  <p>I'm actually binding to different MainViewModels and the data is not shared anymore. Do I need some classes from MVVM libraries such Locator and so? How this could be done? What can I do in the future in order to have separate ViewModels for each View but the same (or different) data?</p>