title: Set background color for selected items in a ListBox
body: <p>I cannot set the background color for the selected item on a list box.  I don't want the alternating colors in this example.  I put them in as a test and they work.  Trigger IsSelected is firing as the fontweight goes to bold and the foreground goes to red.  Setting highlight color brush to SteelBlue does not achieve the desired effect as it goes away when the ListBox loses focus.  Red and bold does hold when the ListBox loses focus and is what I want.  I want the background color to take and hold for the selected item.  Right now the background for the selected items is white and holds when the ListBox loses focus. Thanks for your help and I will test any proposed fix.</p>
  
  <pre><code>    &lt;ListBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1" Name="WFEnum" Visibility="Visible" BorderThickness="2" Margin="1" Padding="2,2,7,2"
               ItemsSource="{Binding Path=SearchItem.SrchWorkFlows}" HorizontalAlignment="Left" 
               PresentationTraceSources.TraceLevel="High" AlternationCount="2" &gt;
          &lt;ListBox.ItemContainerStyle&gt;
              &lt;Style TargetType="ListBoxItem"&gt;
                  &lt;Setter Property="VerticalContentAlignment" Value="Center" /&gt;
                  &lt;Style.Triggers&gt;
                      &lt;Trigger Property="ItemsControl.AlternationIndex" Value="0"&gt;
                          &lt;Setter Property="Background" Value="LightGreen"&gt;&lt;/Setter&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="ItemsControl.AlternationIndex" Value="1"&gt;
                          &lt;Setter Property="Background" Value="LightPink"&gt;&lt;/Setter&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsSelected" Value="True" &gt;
                          &lt;Setter Property="FontWeight" Value="Bold" /&gt;
                          &lt;Setter Property="Background" Value="SteelBlue" /&gt;
                          &lt;Setter Property="Foreground" Value="Red" /&gt;
                      &lt;/Trigger&gt;
                  &lt;/Style.Triggers&gt;
                  &lt;Style.Resources&gt;
                      &lt;SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/&gt;
                  &lt;/Style.Resources&gt;
              &lt;/Style&gt;
          &lt;/ListBox.ItemContainerStyle&gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;TextBlock Text="{Binding Path=Name, Mode=OneWay}" Background="Transparent" /&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
      &lt;/ListBox&gt;
  </code></pre>