i have a simple button whom i want to switch his template(or style ...)when he is being preesed
i want to move from this
<DataTemplate>
<Button
Click="Button_Click"
DataContext="{Binding}"
Height="65" Width="79"
Background="Black"
Content="{Binding Path=CardWasFounded}"/>
</DataTemplate>
to this :
<Button
Click="Button_Click"
DataContext="{Binding}"
Height="65" Width="79"
Background="{Binding Path=ButtonColor}"
Content="{Binding Path=CardWasFounded}"/>
</DataTemplate>
EDIT
after i have done
<Button
Name="btn"
Click="Button_Click"
DataContext="{Binding}"
Height="65" Width="79"
Background="Black"/>
<DataTemplate.Triggers>
<Trigger SourceName="btn" Property="IsMouseCaptured" Value="True" >
<Setter TargetName="btn" Property="Background" Value="Green"/>
<!--"{Binding Path=ButtonColor}"-->
</Trigger>
</DataTemplate.Triggers>
it's still doesn't work I think it's because the .net default or something when the mouse is over the button its get's the blue defult color insted of my green or my binding ...
my goal its when its clicked to hook up a binding to color and a storyboard can someone help me achive it ?