title: ListBox ItemTemplate Background Transparent
body: <p>I am trying to set the Background to Transparent, however as you can see in the screen shot below when the mouse hovers over the <code>ListBoxItem</code> it shows a blue Rectangle over the item:</p>
  
  <p><img src="https://i.stack.imgur.com/vf5Bo.jpg" alt="ListViewItem Screen Shot"></p>
  
  <p>I am using MVVM and my implementation is as follows:</p>
  
  <pre><code>&lt;UserControl.Resources&gt;
      &lt;Style x:Key="HyperLinkStyle" TargetType="{x:Type Hyperlink}"&gt;
          &lt;Setter Property="Foreground" Value="#FF0066CC"/&gt;
          &lt;Setter Property="TextDecorations" Value="None" /&gt;
          &lt;Style.Triggers&gt;
              &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                  &lt;Setter Property="Foreground" Value="#FF0066CC"/&gt;
                  &lt;Setter Property="TextDecorations" Value="Underline" /&gt;
              &lt;/Trigger&gt;
              &lt;Trigger Property="IsEnabled" Value="False"&gt;
                  &lt;Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/&gt;
              &lt;/Trigger&gt;
              &lt;Trigger Property="IsEnabled" Value="True"&gt;
                  &lt;Setter Property="Cursor" Value="Hand"/&gt;
              &lt;/Trigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  &lt;/UserControl.Resources&gt;
  
  &lt;Grid&gt;
      &lt;Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0, 10, 0, 0"&gt;
          &lt;ListBox x:Name="TeamListView" ItemsSource="{Binding Teams}" BorderThickness="0" 
                   SelectionMode="Single" Background="Transparent"&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;DataTemplate.Resources&gt;
                          &lt;Style TargetType="ListBoxItem"&gt;
                              &lt;Setter Property="Background" Value="Transparent"/&gt;
                              &lt;Style.Triggers&gt;
                                  &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                                      &lt;Setter Property="Background" Value="Transparent"/&gt;
                                  &lt;/Trigger&gt;
                              &lt;/Style.Triggers&gt;
                          &lt;/Style&gt;
                      &lt;/DataTemplate.Resources&gt;
                      &lt;TextBlock Margin="0, 0, 0, 5"&gt;
                              &lt;Hyperlink Style="{Binding Source={StaticResource HyperLinkStyle}}" 
                                         Command="{Binding ElementName=TeamListView, Path=DataContext.ConnectToTeam}" 
                                         CommandParameter="{Binding}"&gt;
                                  &lt;TextBlock Text="{Binding Path=DisplayName}" /&gt;
                              &lt;/Hyperlink&gt;
                      &lt;/TextBlock&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt;
      &lt;/Grid&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Notes:</p>
  
  <ol>
  <li><p>The hyperlinkstyle is used to give a hyperlink feel to the hyperlink control with in listbox.</p></li>
  <li><p>The listbox 'TeamListView' uses an ItemTemplate DataTemplate. The style for the ItemTemplate is ListBoxItem, by setting background to transparent onMouseHover the intention is to remove the blue with no color on hover. </p></li>
  </ol>
  
  <p>What am I missing? </p>