title: WPF DataTemplate ContentPresenter "Binding"
body: <p>Can someone explain me how the code I am using here can work?</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;DataTemplate DataType="{x:Type VM:PBRKEntryViewModel}"&gt;
          &lt;V:Overview  /&gt;
      &lt;/DataTemplate&gt;
      &lt;DataTemplate DataType="{x:Type VM:LoginViewModel}"&gt;
          &lt;V:LoginView /&gt;
      &lt;/DataTemplate&gt;
  &lt;/Window.Resources&gt;
  &lt;Grid&gt;
      &lt;ContentPresenter Content="{Binding CurrentView}"/&gt;
  &lt;/Grid&gt;       
  </code></pre>
  
  <p>My current problems in Details are:</p>
  
  <ul>
  <li>Why can the ContentPresenter present the correct UserControl without Reference to the different DataTemplates? I can see, that ContentPresenter content is bound to my ViewModels CurrentViewProperty but my DataTemplates not?</li>
  <li>Another great feature is that the UserControls using the correct ViewModels without a declaration. (Or without a declaration I can see)</li>
  </ul>
  
  <p>I have found this description <a href="http://msdn.microsoft.com/en-us/library/System.Windows.Controls.ContentPresenter(v=vs.110).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/System.Windows.Controls.ContentPresenter(v=vs.110).aspx</a> but the remarks section has no answer to this questions. (Or I couldn´t see them...)</p>
  
  <p>Again and just for clarity everything is working perfect, but I do not understand why, so this is just a question to understand the Selection of the template and the Binding.</p>