title: WPF Listbox Show Button in ItemTemplate on MouseOver
body: <p>I have a listbox containing and image and a button. By default the button is hidden. I want to make the button visible whenever I hover over an item in the listbox.
  The XAML I am using is below. Thanks</p>
  
  <pre><code>&lt;Window.Resources&gt;
          &lt;Style TargetType="{x:Type ListBox}"&gt;
      &lt;Setter Property="ItemTemplate"&gt;
                      &lt;Setter.Value&gt;
                          &lt;DataTemplate&gt;
                              &lt;Border BorderBrush="Black" BorderThickness="1" Margin="6"&gt;
                                  &lt;StackPanel Orientation="Horizontal"&gt;
                                      &lt;Image Source="{Binding Path=FullPath}" Height="150" Width="150"/&gt;
                                      &lt;Button x:Name="sideButton" Width="20" Visibility="Hidden"/&gt;
                                  &lt;/StackPanel&gt;
                              &lt;/Border&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/Setter.Value&gt;
                  &lt;/Setter&gt;
          &lt;/Style&gt;
      &lt;/Window.Resources&gt;
  </code></pre>