title: How do I set a ViewModel on a window in XAML using DataContext property?
body: <p>The question pretty much says it all.</p>
  
  <p>I have a window, and have tried to set the DataContext using the full namespace to the ViewModel, but I seem to be doing something wrong.</p>
  
  <pre><code>&lt;Window x:Class="BuildAssistantUI.BuildAssistantWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      DataContext="BuildAssistantUI.ViewModels.MainViewModel"&gt;
  </code></pre>