Mouseover not working after click in WPF

Posted by Issac under WPF on 4/12/2012 | Points: 10 | Views : 1604 | Status : [Member] | Replies : 1
Hi im using a button and im wrote a style for that on MouseOver to change the color
the style is working when MouseOver is there...but after i click and then MouseOver...
then MouseOver is not working...i mean color is not changing...
can anybody help

here is the code which i used

<Style x:Key="Header" TargetType="{x:Type Button}">
<Setter Property="Background" Value="#3D9828"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#70af0e"/>
</Trigger>
</Style.Triggers>
</Style>




Responses

Posted by: Sheefabauliah on: 8/15/2012 [Member] Starter | Points: 25

Up
0
Down
hai,

try mouse over Event and change the Background Color of the Button like

u have the Event button object "sender",

(sender as Button).Background = Brushes.Blue;

Regards

Sheeba

Issac, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response