Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Buuton IsMouseOver Trigger not working

$
0
0

Hello

i need your help to fix simple issue.

i want to customize my WPF button i used this code 

<Button  x:Name="btnTravel" FontWeight="Bold"  Margin="0,0,183,0"   Content=" Subscribe"      FontSize="12"  VerticalAlignment="Top" HorizontalContentAlignment="Right" HorizontalAlignment="Right"><Button.Style><Style TargetType="{x:Type Button }"><Setter Property="Background"    Value="#FF6EA417"  /><Setter Property="BorderThickness"  Value="0" /><Setter Property="Padding"   Value="5,1" /><Setter Property="Foreground" Value="White" /><Setter Property="FontSize" Value="11" /><Setter Property="Height" Value="25" /><Style.Triggers><Trigger Property="IsMouseOver" Value="True"><Setter Property="Background" Value="#FF8ec458" /><Setter Property="Foreground" Value="White" /></Trigger></Style.Triggers></Style></Button.Style></Button>

The color on mouseOver do not change .

Why ? can you help me ?

Please i do not want to use Button.Template

<Button.Template><ControlTemplate TargetType="{x:Type Button}">
......
....
Thanks 

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>