title: Binding ContentControl Content for dynamic content
body: <p>I'm currently trying to achieve the functionality of a tabcontrol with hidden tabs by using a ListView (as tabs) and a ContentControl with Binding the Content Property.</p>
  
  <p>I read a bit on that topic and if I got it right, it should work this way:</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="20.0*"/&gt;
          &lt;ColumnDefinition Width="80.0*"/&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;ListBox Grid.Column="0"&gt;
          &lt;ListBoxItem Content="Appearance"/&gt;
      &lt;/ListBox&gt;
  
      &lt;ContentControl Content="{Binding SettingsPage}" Grid.Column="1"/&gt;
  &lt;/Grid&gt;
  .
  .
  &lt;ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
      &lt;ContentControl x:Key="AppearancePage"&gt;
          &lt;TextBlock Text="Test" /&gt;
      &lt;/ContentControl&gt;
      &lt;ContentControl x:Key="AdvancedPage"&gt;
          &lt;TextBlock Text="Test2" /&gt;
      &lt;/ContentControl&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>And in the code behind:</p>
  
  <pre><code>public partial class MainWindow : MetroWindow
    {
      private ContentControl SettingsPage;
      private ResourceDictionary SettingsPagesDict = new ResourceDictionary();
  
      public MainWindow()
      {
          InitializeComponent();
  
          SettingsPagesDict.Source = new Uri("SettingsPages.xaml", UriKind.RelativeOrAbsolute);
          SettingsPage = SettingsPagesDict["AppearancePage"] as ContentControl;
  </code></pre>
  
  <p>Allthough it throws no error, it doesn't display the "Test" TextBlock.</p>
  
  <p>Its likely I got the concept of binding wrong, please give me a hint in the right direction.</p>
  
  <p>Regards</p>