title: DataTemplate + MVVM
body: <p>I'm using MVVM and each View maps to a ViewModel with a convention. IE
  MyApp.Views.MainWindowView
  MyApp.ViewModels.MainWindowViewModel</p>
  
  <p>Is there a way to remove the DataTemplate and do it in C#? with some sort of loop?</p>
  
  <pre><code>&lt;DataTemplate DataType="{x:Type vm:MainWindowViewModel}"&gt;
      &lt;vw:MainWindowView /&gt;
  &lt;/DataTemplate&gt;
  </code></pre>