title: WPF ListBoxItem IsMouseOver
body: <p>I have a ListBox, which on mousing over an item shows a delete button for that item. The problem is that the IsMouseOver triggers about 4 pixels into the highlighted item, so when mousing over multiple items, instead of the delete button seeming to move up and down with you, it flickers in the gaps between the items. Is there anyway to make IsMouseOver respond to the whole item?</p>
  
  <pre><code>&lt;ListBox Name="lstLength" ItemsSource="{Binding Source={StaticResource lengths}}"&gt;
      &lt;ListBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;DockPanel LastChildFill="True" Height="22"&gt;
                  &lt;Button DockPanel.Dock="Right" Name="btnDelete" Content="X" Tag="{Binding}" Click="DeleteLength" Visibility="Collapsed" /&gt;
                  &lt;TextBlock Text="{Binding}" /&gt;
              &lt;/DockPanel&gt;
  
              &lt;DataTemplate.Triggers&gt;
                  &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                      &lt;Setter TargetName="btnDelete" Property="Visibility" Value="Visible" /&gt;
                  &lt;/Trigger&gt;
              &lt;/DataTemplate.Triggers&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  </code></pre>