title: Set background color of ComboBox MouseOver highlighted item in the style
body: <p>I want to achive the same thing asked in this question: <a href="https://stackoverflow.com/questions/1278144/set-combobox-selected-item-highlight-color">Set ComboBox selected item highlight color</a>: set the background of the highlighted item.</p>
  
  <p>However, instead of adding this to every combobox:</p>
  
  <pre><code>&lt;ComboBox  ... &gt;
      &lt;ComboBox.Resources&gt;
          &lt;SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF745005"/&gt;
      &lt;/ComboBox.Resources&gt;
      ...
  &lt;/ComboBox&gt;
  </code></pre>
  
  <p>I want to add this to the style i have for every combobox. This is my combobox style:</p>
  
  <pre><code>&lt;Style TargetType="ComboBox"&gt;
      &lt;Setter Property="VerticalAlignment" Value="Center" /&gt;
      &lt;Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" /&gt;
      &lt;Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" /&gt;
      &lt;Setter Property="Margin" Value="2" /&gt;
      &lt;Setter Property="MinHeight" Value="20" /&gt;
  
  
          &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="ComboBox"&gt;
                  &lt;Grid&gt;
                      &lt;VisualStateManager.VisualStateGroups&gt;
                          &lt;VisualStateGroup x:Name="CommonStates"&gt;
                              &lt;VisualState x:Name="Normal"/&gt;
                              &lt;VisualState x:Name="MouseOver"/&gt;
                              &lt;VisualState x:Name="Disabled"/&gt;
                          &lt;/VisualStateGroup&gt;
                      &lt;/VisualStateManager.VisualStateGroups&gt;
                      &lt;ToggleButton x:Name="ToggleButton" Grid.Column="2" ClickMode="Press" 
                          Focusable="false"
                          IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                          Template="{StaticResource ComboBoxToggleButton}"/&gt;
  
                      &lt;ContentPresenter Margin="3,3,23,3" 
                          Content="{TemplateBinding SelectionBoxItem}"
                          ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
                          ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                          HorizontalAlignment="Left" IsHitTestVisible="False" x:Name="ContentSite"
                          VerticalAlignment="Center" /&gt;
  
                      &lt;TextBox Style="{x:Null}" 
                          x:Name="PART_EditableTextBox" 
                          Margin="3,3,23,3" 
                          Background="Transparent"
                          Focusable="True" 
                          HorizontalAlignment="Left" 
                          IsReadOnly="True"
                          Template="{StaticResource ComboBoxTextBox}" 
                          VerticalAlignment="Center" 
                          Visibility="Hidden"
                          Text="{TemplateBinding Text}"
                               /&gt;
  
                      &lt;Popup 
                          AllowsTransparency="True" 
                          Focusable="False" 
                          IsOpen="{TemplateBinding IsDropDownOpen}"
                          x:Name="Popup" 
                          Placement="Bottom" 
                          PopupAnimation="Fade"&gt;
                          &lt;Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" 
                              SnapsToDevicePixels="True"&gt;
                              &lt;Border x:Name="DropDownBorder" 
                                      Background="White" 
                                      BorderBrush="{StaticResource BorderBrush}" 
                                      BorderThickness="1" 
                                      CornerRadius="0" /&gt;
                              &lt;ScrollViewer Margin="2" 
                                  SnapsToDevicePixels="True"
                                  Background="{StaticResource BackgroundBrush}"&gt;
                                  &lt;StackPanel 
                                      KeyboardNavigation.DirectionalNavigation="Contained" 
                                      IsItemsHost="True" 
                                      TextBlock.Foreground="Black"
                                      /&gt;
                              &lt;/ScrollViewer&gt;
                          &lt;/Grid&gt;
                      &lt;/Popup&gt;
                  &lt;/Grid&gt;
                  &lt;ControlTemplate.Triggers&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
      &lt;Style.Triggers&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>I have no idea about how to achieve this. Tried to modify a "Resources" or "SolidColorBrush" property, but didn't work.</p>