title: Each dictionary entry must have an associated key error in WPF project
body: <p>I get the following error in my App.xaml file: "Each dictionary entry must have a key"</p>
  
  <p>My App.xaml looks like this:</p>
  
  <pre><code>&lt;Application.Resources&gt;
      &lt;DataTemplate DataType="{x:Type Model:ClassData}"&gt;
          &lt;Canvas&gt;
              &lt;View:ClassDataUserControl/&gt;
          &lt;/Canvas&gt;
      &lt;/DataTemplate&gt;
  
      &lt;ResourceDictionary&gt; &lt;----- ERROR HERE
          &lt;ResourceDictionary.MergedDictionaries&gt;
              &lt;ResourceDictionary Source="/UMLDiagram.Windows.Theme;component/Theme.xaml"/&gt;
          &lt;/ResourceDictionary.MergedDictionaries&gt;
      &lt;/ResourceDictionary&gt;
  
      &lt;DataTemplate DataType="{x:Type Model:Connector}"&gt;
          &lt;Canvas&gt;
              &lt;View:ConnectorUserControl/&gt;
          &lt;/Canvas&gt;
      &lt;/DataTemplate&gt;
  &lt;/Application.Resources&gt;
  </code></pre>
  
  <p>My Resource Dictionary (ButtonStyle.xaml) is placed in another project called UMLDiagram.Windows.Theme and the code looks like this:</p>
  
  <pre><code>&lt;Style TargetType="Button"&gt;
      &lt;Setter Property="Background"&gt;
          &lt;Setter.Value&gt;
              &lt;LinearGradientBrush EndPoint="0,1" StartPoint="0,0"&gt;
                  &lt;GradientStop Color="#FFF3F3F3" Offset="0"/&gt;
                  &lt;GradientStop Color="#FFEBEBEB" Offset="0.5"/&gt;
                  &lt;GradientStop Color="#FFDDDDDD" Offset="0.5"/&gt;
                  &lt;GradientStop Color="#FF456DB4" Offset="1"/&gt;
              &lt;/LinearGradientBrush&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
   &lt;/Style&gt; 
  </code></pre>
  
  <p>To make the software scaleable the ButtonStyle.xaml is called via Theme.xaml (also placed in UMLDiagram.Windows.Theme project) </p>
  
  <pre><code>&lt;ResourceDictionary.MergedDictionaries&gt;
      &lt;ResourceDictionary Source="ButtonStyle.xaml"/&gt;
  &lt;/ResourceDictionary.MergedDictionaries&gt;
  </code></pre>
  
  <p>I have tried everything and I cannot see why I see the error!</p>
  
  <p>Can anybody please help me with this problem?</p>
  
  <p>Best regards,
  Mikael</p>