title: Combobox background not being applied in windows 8
body: <p>I am a little confused with wpf themes. I would like to have the wpf screens look the same on Vista, Windows 7 and Windows 8. So I have styled the components accordingly and they don't pose problems except when run on Windows 8. For example I have a combobox and I am changing its default background in xaml like this.</p>
  
  <pre><code>&lt;Style TargetType="{x:Type ComboBox}" &gt;
      &lt;Setter Property="FontStyle" Value="Normal"/&gt;
      &lt;Setter Property="Height" Value="24" /&gt;
      &lt;Setter Property="Background" Value="{StaticResource GradientButtonBackgroundBrush}"/&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>The combobox Background property has no effect in windows 8 and all I get is a flat rectangle with a arrow on right (the default windows 8 combobox, which is rather poorly designed!). </p>
  
  <p>So, my question is that how do I get the combobox look the same on all version of windows. I tried adding windows Aero theme in my App.xaml like below, but it has no effect on the combobox display. Here is how I added Aero theme</p>
  
  <pre><code>&lt;Application.Resources&gt;
      &lt;ResourceDictionary&gt;
          &lt;ResourceDictionary.MergedDictionaries&gt;
              &lt;ResourceDictionary Source="/PresentationFramework.Aero;component/themes/aero.normalcolor.xaml"/&gt;
          &lt;/ResourceDictionary.MergedDictionaries&gt;
      &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>There is also another doubt regarding themes. I am building the wpf application on a windows 7 machine, which by default (I believe) has Aero Theme set. So, all my styles are based on the Aero theme when viewed on Windows 7 machine. What happens if I run the application on say XP. Then do I need to add an entry for the resource dictionary (Aero theme) in App.xaml as listed in code above? </p>
  
  <p>I know my question is a bit vague, but believe me, I am really confused with default themes of wpf on different Windows versions.</p>
  
  <p><strong>EDIT:</strong>
  I still can't get combobox to style according to my needs. The combobox still appears like a gray rectangle. </p>
  
  <p>Here is what I did. I downloaded the Aero.NormalColor.xaml from microsoft's site and included in themes folder of application. Then I added the following in App.xaml</p>
  
  <pre><code>    &lt;ResourceDictionary&gt;
          &lt;ResourceDictionary.MergedDictionaries&gt;
              &lt;ResourceDictionary Source="/Themes/Aero.NormalColor.xaml"/&gt;
          &lt;/ResourceDictionary.MergedDictionaries&gt;
      &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>Then I Compiled the application and deployed on Windows 8. Still the same combobox as was shown previously. Note that all other elements get styled properly according to the theme. I did the same with Luna.Metallic.xaml and every element gets styled except the <strong>ComboBox</strong>. </p>
  
  <p>I believe that when I load a particular theme, which defines styles with <strong>ControlTemplate</strong>, then it should be picked by wpf. I am confused as to why only the <strong>ComboBox</strong> even after giving it a Aero (or Luna) Control Template doesn't change its appearance. Any ideas ?</p>
  
  <p><strong>EDIT-2</strong>
  Screen shot of combobox appearance on Windows 8
  <img src="https://i.stack.imgur.com/tSqwB.png" alt="enter image description here"></p>