title: WPF Designer Failing to Load Generic.xaml
body: <p>I have written a WPF Class Library. It has a Generic.xaml file under a themes folder in the project and also a ThemeInfo attribute in the AssemblyInfo.cs file:</p>
  
  <pre><code>[assembly: ThemeInfo(
      ResourceDictionaryLocation.None, 
      ResourceDictionaryLocation.SourceAssembly)]
  </code></pre>
  
  <p>All works well, except in the designer. I get blue squigly lines anywhere I am using StaticResource to reference my brushes, styles and other resources saying:</p>
  
  <blockquote>
    <p>The resource '[Resource Name]' cannot be found.</p>
  </blockquote>
  
  <p>I really want the designer to pick up my Generic.xaml file and show the controls <strong>as I have styled them</strong>. How can I achieve this?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have marked Yogesh's answer as correct but here is some more information. I was adding the resource dictionary in the constructor of the App.xaml file, instead of in the xaml. The XAML designer does not seem to execute the code behind for the App.xaml file.</p>