title: How to add a page in another dll into a window in wpf
body: <p>I created a new wpf application, with the default MainWindow.xaml, </p>
  
  <p>and I created a new page: Page1.xaml with a button in it.</p>
  
  <p>I want to embed the page in the window, so I tried:</p>
  
  <pre><code>    &lt;Window x:Class="WpfApplication1.MainWindow"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:WpfApplication1="clr-namespace:WpfApplication1" Title="MainWindow" Height="350" Width="525"&gt;
          &lt;Grid&gt;
              &lt;WpfApplication1:Page1&gt;&lt;/WpfApplication1:Page1&gt;
          &lt;/Grid&gt;
      &lt;/Window&gt;
  </code></pre>
  
  <p>Then I got a exception.</p>
  
  <p>I searched here, and got another solution, using </p>
  
  <p>so I tried this:</p>
  
  <pre><code>    &lt;Window x:Class="WpfApplication1.MainWindow"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:WpfApplication1="clr-namespace:WpfApplication1" Title="MainWindow" Height="350" Width="525"&gt;
          &lt;Grid&gt;
              &lt;Frame Source="Page1.xaml"/&gt;
          &lt;/Grid&gt;
      &lt;/Window&gt;
  </code></pre>
  
  <p>it worked.</p>
  
  <p>But </p>
  
  <p>what if the Page1.xaml is not in current project but in a dll file?</p>