title: Set Window.Content to a page by XAML?
body: <pre><code>&lt;Window x:Class="MyWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:src="clr-namespace:WpfApplication1"
      Title="ContactsSelector" Height="300" Width="300"&gt;
      &lt;Window.Content&gt;
          &lt;src:MyPage&gt;
             &lt;!--MyPage is a page that I created and exists in the project--&gt; 
          &lt;/src:MyPage&gt;
      &lt;/Window.Content&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>I want to set the content of a window to a page, just like I would do it programmatically:</p>
  
  <pre><code>Dim w As New MyWindow
  Dim p As New MyPage
  w.Content = p
  w.ShowDialog()
  </code></pre>
  
  <p>Or set it in the Load event of the window, summarily I want it to be done in xaml.</p>