title: ListBox mouse over background color
body: <p>The problem I have is the MouseOver trigger to color the background fails on the selected row.<br>
  For any non-selected row the background turns blue on mouse over.<br>
  But no blue background for the selected row.<br>
  Click on a row and then the background blue goes away.  </p>
  
  <p>I also tried the style in the ListBox.ItemContainerStyle</p>
  
  <pre><code>&lt;Window x:Class="ListBoxLastIntoView.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="350" Width="525"&gt;
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="0"/&gt;
              &lt;RowDefinition Height="*"/&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;ListBox Grid.Row="1" Grid.ColumnSpan="2" x:Name="lvMVitems" 
              ItemsSource="{Binding Mode=OneWay}" 
              ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" MaxHeight="300"&gt;
              &lt;ListBox.Resources&gt;
                  &lt;Style TargetType="ListBoxItem"&gt;
                      &lt;Style.Resources&gt;
                          &lt;!-- Background of selected item when focussed --&gt;
                          &lt;SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/&gt;
                          &lt;!-- Background of selected item when not focussed --&gt;
                          &lt;SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Transparent" /&gt;
                      &lt;/Style.Resources&gt;
                      &lt;Style.Triggers&gt;
                          &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                              &lt;Setter Property="Background" Value="LightSteelBlue" /&gt;
                          &lt;/Trigger&gt;
                      &lt;/Style.Triggers&gt;
                  &lt;/Style&gt;                 
              &lt;/ListBox.Resources&gt;
              &lt;!--&lt;ListBox.ItemContainerStyle&gt;               
              &lt;/ListBox.ItemContainerStyle&gt;--&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;TextBlock Text="{TemplateBinding Content}" Background="Orange" Margin="20,2,2,2"&gt;
                      &lt;/TextBlock&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  
  
  namespace ListBoxLastIntoView
  {
      public partial class MainWindow : Window
      {
          private string lorum = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
          private List&lt;string&gt; lorums = new List&lt;string&gt;();
          public MainWindow()
          {
              for (int i = 1; i &lt; 100; i++) lorums.Add(i.ToString() + " " + lorum);           
              InitializeComponent();
              //lb.ItemsSource = lorums;
              lvMVitems.ItemsSource = lorums;
          }
      }
  }
  </code></pre>