I have a button, as such:
<Button HorizontalAlignment="Left" Margin="0,55,0,0" VerticalAlignment="Top" Width="350" Click="StartProcedure_Click" BorderThickness="0" Height="60" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" HorizontalContentAlignment="Left" ScrollViewer.VerticalScrollBarVisibility="Disabled" VerticalContentAlignment="Center" Padding="10,1,0,0" IsHitTestVisible="True">
<StackPanel Orientation="Horizontal">
<Image Source="resources\img_xraystarticon.png" Width="50" Height="50"/>
<TextBlock TextElement.Foreground="#6a6869" Padding="5,0,0,0" VerticalAlignment="Center" FontSize="30" FontFamily="Century Gothic">Start Procedure</TextBlock>
</StackPanel>
<Button.Background>
<ImageBrush ImageSource="resources\img_emptyrectbutton.png"/>
</Button.Background>
</Button>
Where I applied the Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" style to remove the mouseover effects defaulting with the Button. However, I still continue to experience a mouseover effect, as shown here:
Prior to Mouseover, and with Mouseover:
I have attempted to override the MouseEnter event with no success (I have confirmed my MouseEnter event is triggered but I can't seem to negate the property that is set with MouseEnter by default with the above).
What do I need to do to avoid the above?
Thanks!
EDIT:
I have entered the below code but I am now unable to get a MouseEnter function to execute properly (I want the text to change colors but I am not seeing it happen):
<Button Name="Button_StartMenu" HorizontalAlignment="Left" Margin="0,55,0,0" VerticalAlignment="Top" Width="350" Click="StartProcedure_Click" BorderThickness="0" Height="60" HorizontalContentAlignment="Left" ScrollViewer.VerticalScrollBarVisibility="Disabled" VerticalContentAlignment="Center" Padding="10,1,0,0" IsHitTestVisible="True" MouseEnter="Button_MouseEnter">
<Button.Background>
<ImageBrush ImageSource="resources\img_emptyrectbutton.png"/>
</Button.Background>
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<StackPanel Orientation="Horizontal">
<Image Source="resources\img_xraystarticon.png" Width="50" Height="50"/>
<TextBlock TextElement.Foreground="#6a6869" Padding="5,0,0,0" VerticalAlignment="Center" FontSize="30" FontFamily="Century Gothic"><Run Text="Start Procedure"/></TextBlock>
</StackPanel>
</Button>