title: Setting <Window.DataContext> in XAML
body: <p>I followed a very simple MVVM example as a basis for my program. The author had one code behind instruction he used in the main page to set the <code>DataContext</code>. I'm thinking I should be able to do this in the XAML instead. The MainWindowViewModel is in a directory ViewModels. The code behind works.</p>
  
  <pre><code>namespace RDLfromSP
  {
      /// &lt;summary&gt;
      /// Interaction logic for MainWindow.xaml
      /// &lt;/summary&gt;
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              InitializeComponent();
              DataContext = new ViewModels.MainWindowViewModel();
          }
      }
  }
  </code></pre>
  
  <p>I can't seem to find the right combo to set it instead in the XAML</p>
  
  <pre><code>&lt;Window x:Class="RDLfromSP.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="300" Width="300" &gt; 
  
      &lt;Window.DataContext&gt;
          &lt;local:ViewModels.MainWindowViewModel /&gt;
      &lt;/Window.DataContext&gt;
  </code></pre>
  
  <p>Thanks in advance for your help</p>