title: How can I reference a resource in a separate ResourceDictionary in WPF?
body: <p>In my project (ABC), I have MainWindow.xaml where I have defined a toolbar for it and this toolbar is defined in 
  project under Resource/Views/ApplicationToolbar.xmal as following:</p>
  
  <p>
      
      
  </p>
  
  <p>I have referenced it in my MainWindow.xaml as  <code>xmlns:local="clr-namespace:ABC"</code> and as soon as I run it I get an 
  error indicating View123 not found.</p>
  
  <p>More information: (EDIT)</p>
  
  <pre><code>&lt;ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      xmlns:local="clr-namespace:ABC"&gt;
  
      &lt;StackPanel x:Key="View1"&gt;
          &lt;Button Margin="3" Content="Test1"&gt;&lt;/Button&gt;
          &lt;Button Margin="3" Content="Test2"&gt;&lt;/Button&gt;
      &lt;/StackPanel&gt;
  
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>Now in MainWindow.xmal have:</p>
  
  <pre><code>&lt;Window x:Class="ABC.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ABC"
          Title="MainWindow" Height="350" Width="525"&gt;
      &lt;Grid Margin="10"&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="Auto"/&gt;
              &lt;RowDefinition Height="10"/&gt;
              &lt;RowDefinition Height="*"/&gt;
              &lt;RowDefinition Height="10"/&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;!-- FOLLOWING LINE CAUSING ERROR--&gt;
          &lt;ContentControl Name="Toolbar" Content="{StaticResource View1 }"&gt;&lt;/ContentControl&gt;
  
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>Thanks,
  Amit</p>