title: Button in WPF acting in strange way with isMouseOver
body: <p>I am having a funny issue here with WPF and a button styled. Problem is it contains a path and isMouseOver seems to only trigger when the mouse pointer is over the path but not over the button. That is I have to move the mouse pointer over the white figure inside the button to have the button shaded. Is as if the button wouldn't exist and only the path would.</p>
  
  <p>This is the code for the button: </p>
  
  <pre><code>&lt;Button Grid.Column="5" x:Name="btnClose" Width="30" Height="30" BorderBrush="White"
          BorderThickness="0" Style="{StaticResource MenuButtonStyle}"
          Command="{Binding ExitCommand}"&gt;
      &lt;Path Data="M0,0 L16,16 M16,0 L0,16" Stroke="White" StrokeThickness="3" 
            Margin="0,1,0,0" StrokeEndLineCap="Round" StrokeStartLineCap="Round" /&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>And this is the style:</p>
  
  <pre><code>&lt;Style x:Key="MenuButtonStyle" TargetType="Button"&gt;
      &lt;Setter Property="Width" Value="80" /&gt;
      &lt;Setter Property="Height" Value="80" /&gt;
      &lt;Setter Property="Margin" Value="0,0,0,0" /&gt;
      &lt;Setter Property="FontSize" Value="13.5"/&gt;
      &lt;Setter Property="Foreground" Value="Red"/&gt;
      &lt;Setter Property="RenderTransformOrigin" Value="0.5,0.5"/&gt;
      &lt;Setter Property="OverridesDefaultStyle" Value="True"/&gt;
      &lt;Setter Property="ToolTipService.ShowOnDisabled" Value="True"/&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="Button"&gt;
                  &lt;Border CornerRadius="2.5" 
                          x:Name="ButtonBorder" 
                          BorderThickness="1.2" 
                          RenderTransformOrigin="0.5,0.5"&gt;
                      &lt;Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0"&gt;
  
                          &lt;Border x:Name="ButtonShine" Grid.Row="0" VerticalAlignment="Stretch"
                                  HorizontalAlignment="Stretch" &gt;
                              &lt;!--&lt;Border.Effect&gt;
                                      &lt;DropShadowEffect ShadowDepth="1" BlurRadius="1" RenderingBias="Quality" Direction="270" /&gt;
                                  &lt;/Border.Effect&gt;--&gt;
                          &lt;/Border&gt;
                          &lt;ContentPresenter Grid.Row="0" VerticalAlignment="Center"
                                            HorizontalAlignment="Center" /&gt;
                          &lt;Border x:Name="shadowMouseOver" Grid.Row="0" Visibility="Hidden"
                                  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" 
                                  Background="#7F171717"&gt;
                          &lt;/Border&gt;
                          &lt;Border x:Name="shadowDisabled" Grid.Row="0" Visibility="Hidden"
                                  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" 
                                  Background="#AFFFFFFF"&gt;
                          &lt;/Border&gt;
                      &lt;/Grid&gt;
                  &lt;/Border&gt;
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;Trigger Property="Button.IsEnabled" Value="false"&gt;
                          &lt;Setter Property="Button.Foreground" Value="#FFDEDEDE" /&gt;
                          &lt;Setter Property="Visibility" TargetName="shadowDisabled" Value="Visible"/&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="Button.IsMouseOver" Value="true"&gt;
                          &lt;Setter Property="Visibility" TargetName="shadowMouseOver" Value="Visible"/&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="Button.IsPressed" Value="true"&gt;
                          &lt;Setter Property="Button.RenderTransformOrigin" Value="0.5,0.5"/&gt;
                          &lt;Setter Property="Button.RenderTransform"&gt;
                              &lt;Setter.Value&gt;
                                  &lt;ScaleTransform ScaleX="0.95" ScaleY="0.95"/&gt;
                              &lt;/Setter.Value&gt;
                          &lt;/Setter&gt;
                          &lt;Setter Property="Visibility" TargetName="shadowMouseOver" Value="Visible"/&gt;
                          &lt;Setter Property="Background" TargetName="ButtonShine" &gt;
                              &lt;Setter.Value&gt;
                                  &lt;LinearGradientBrush  EndPoint="0.5,1" StartPoint="0.5,0"&gt;
                                       &lt;GradientStop Color="#FFBFBFBF" Offset="1"/&gt;
                                       &lt;GradientStop Color="#FF383838"/&gt;
                                  &lt;/LinearGradientBrush&gt;
                              &lt;/Setter.Value&gt;
                          &lt;/Setter&gt;
                          &lt;Setter Property="BorderBrush" TargetName="ButtonShine" &gt;
                              &lt;Setter.Value&gt;
                                  &lt;LinearGradientBrush  EndPoint="0.5,1" StartPoint="0.5,0"&gt;
                                      &lt;GradientStop Color="#FFBFBFBF" Offset="1"/&gt;
                                      &lt;GradientStop Color="#FF383838"/&gt;
                                  &lt;/LinearGradientBrush&gt;
                              &lt;/Setter.Value&gt;
                           &lt;/Setter&gt;
                       &lt;/Trigger&gt;
                   &lt;/ControlTemplate.Triggers&gt;
               &lt;/ControlTemplate&gt;
           &lt;/Setter.Value&gt;
       &lt;/Setter&gt;
   &lt;/Style&gt;
  </code></pre>
  
  <p>Any ideas? Bug in WPF? Something not done properly?</p>