title: How to change ResourceDictionary Dynamically
body: <p>I need to change <code>ResourceDictionary</code> in <code>App.xaml</code> file dynamically. I have tried the following code:</p>
  
  <pre><code>ResourceDictionary newRes = new ResourceDictionary();
  newRes.Source = new Uri("/PsyboInventory;component/TitleBarResource.xaml", UriKind.RelativeOrAbsolute);
  this.Resources.MergedDictionaries.Clear();
  this.Resources.MergedDictionaries.Add(newRes);
  </code></pre>
  
  <p>There is no error, but the theme not change</p>