title: How do I set my main application theme on a dialog box, without setting it explicitly in the XAML?
body: <p><strong>Update</strong></p>
  
  <p>I am embarrassed to say that I made a mistake. The error was that my theme doesn't style the elements I was using to test, so of course I wasn't seeing the applied styles. </p>
  
  <p>However, the answers made in response to this question do show how to explicitly set resources from one UserControl to another... which is interesting.</p>
  
  <p>When I set resources on the application in the way I describe below, it does indeed implicitly set all user control themes in the resulting application.</p>
  
  <hr>
  
  <p>I am using a theme, set as a ResourceDictionary on my main Application class. My main window I guess implicitly uses this theme to style itself. </p>
  
  <pre><code>&lt;Application&gt;
      &lt;Application.Resources&gt;
          &lt;ResourceDictionary Source="Themes/ExpressionDark.xaml" /&gt;
  </code></pre>
  
  <p><strong>The following comments are wrong, and everything is styled implicitly</strong></p>
  
  <p>When I show a dialog however, this is not styled. </p>
  
  <pre><code>DialogBox dialog = new DialogBox();
  dialog.ShowDialog();
  </code></pre>
  
  <p>Is there some way to do this implicitly without specifying the style explicitly in the XAML of DialogBox?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I tried setting the resources in the following ways. They did not work.</p>
  
  <pre><code>Window main = App.Current.Windows[0];
  dialog.Resources = main.Resources;
  dialog.Owner = main;
  </code></pre>
  
  <p>Also tried setting the from the main App... which is where the original resources are defined.</p>
  
  <pre><code>dialog.Resources = App.Current.Resources;
  </code></pre>