title: WPF 'Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.'
body: <p>My application runs fine in VS 2010 but when I copy the executable from the bin folder to another location I get this error:</p>
  
  <p>'Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.' Line number '15' and line position '23'.</p>
  
  <p>Did a bit of testing and found out that if I include the 'System.Windows.Controls.Input.Toolkit', 'System.Windows.Controls.Layout.Toolkit', and 'WPFToolkit' Dlls in the same location as the executable it works.</p>
  
  <p>My application is using the Infragistics Metro Dark theme which I added using NuGet. This is what I added in my App.xaml:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;Application.Resources&gt;
    &lt;ResourceDictionary&gt;
      &lt;ResourceDictionary.MergedDictionaries&gt;
        &lt;ResourceDictionary Source="/XENON;component/Themes/MetroDark/MetroDark.MSControls.Core.Implicit.xaml" /&gt;
        &lt;ResourceDictionary Source="/XENON;component/Themes/MetroDark/MetroDark.MSControls.Toolkit.Implicit.xaml" /&gt;
      &lt;/ResourceDictionary.MergedDictionaries&gt;
    &lt;/ResourceDictionary&gt;
  &lt;/Application.Resources&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Does anyone know why this is occurring? Any help would be appreciated.</p>