title: Override dictionary style with local style
body: <p>I have a user control (a modernTab, provded by <a href="https://github.com/firstfloorsoftware/mui" rel="nofollow noreferrer">modernui</a>) that has a style applied to it, as is specified in a resource dictionary (that again came with <a href="https://github.com/firstfloorsoftware/mui" rel="nofollow noreferrer">modernui</a>).</p>
  
  <p>That's fine, styling for this app is provided through some default resources in the App.xaml file that look like this:</p>
  
  <pre><code>&lt;ResourceDictionary.MergedDictionaries&gt;
      &lt;ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.xaml" /&gt;
      &lt;ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.Light.xaml"/&gt;
  &lt;/ResourceDictionary.MergedDictionaries&gt;
  </code></pre>
  
  <p>That's well and good. However, I want to override the link style I am using for a specific instance of a modernTab. So in my XAML, I'm trying to do it like this:</p>
  
  <pre><code>&lt;mui:ModernTab ListWidth="Auto" 
                 Layout="List" 
                 Links ="{Binding MyViewModelLinks}"&gt;
      &lt;mui:ModernTab.Resources&gt;
          &lt;Style TargetType="ListBoxItem"&gt;
              &lt;Setter Property="Foreground" Value="Black" /&gt;
              &lt;Setter Property="Background" Value="Yellow" /&gt;
          &lt;/Style&gt;
      &lt;/mui:ModernTab.Resources&gt;
  &lt;/mui:ModernTab&gt;
  </code></pre>
  
  <p>Now, I know from looking at the source that down inside the guts of a modernTab control it's got a bunch of ListBoxItems - these are what I want to change the style on. </p>
  
  <p>What I don't get is why my "local" style isn't going down and overriding for this specific instance. Any ideas? </p>
  
  <p>I tried defining my style override in App.xaml (even though I don't really want it to be global) and it didn't work. Clearly I'm missing something.</p>