title: Listbox WPF item background color
body: <p>I want to change the background color of ListBoxItem</p>
  
  <p>After search I decide to use this</p>
  
  <pre><code>&lt;ListBox&gt;
          &lt;ListBox.Resources&gt;
              &lt;!-- Background of selected item when focussed --&gt;
              &lt;SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}"
                               Color="Blue" /&gt;
              &lt;!-- Background of selected item when not focussed --&gt;
              &lt;SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}"
                               Color="Blue" /&gt;
  
          &lt;/ListBox.Resources&gt;
          &lt;TextBlock&gt;fdfsdf1&lt;/TextBlock&gt;
          &lt;TextBlock&gt;fdfsdf3&lt;/TextBlock&gt;
          &lt;TextBlock&gt;fdfsdf5&lt;/TextBlock&gt;
          &lt;TextBlock&gt;fdfsdf3&lt;/TextBlock&gt;
          &lt;TextBlock&gt;fdfsdf4&lt;/TextBlock&gt;
      &lt;/ListBox&gt;
  </code></pre>
  
  <p>When a listboxitem is focused, the background is blue as expected, but when the selected listboxitem loses focus, the background turns gray. How can I make the background remain blue when it loses focus?</p>