Hello,
I'm fairly new to WPF and at the moment I'm trying to create a image button with hover effect. I made a button with an image as background and now I would like to change the opacity of the image on hover.
But it doesn't work so far.
Maybe someone has some suggestions for me. Thanks!
I'm fairly new to WPF and at the moment I'm trying to create a image button with hover effect. I made a button with an image as background and now I would like to change the opacity of the image on hover.
<Button Style="{ StaticResource ImageButton}" Width="16" Height="16" VerticalAlignment="Top" Margin="0,0,30,0" HorizontalAlignment="Right"><Button.Background><ImageBrush ImageSource="<MyImage>"/></Button.Background></Button>I tried it like this within my style template
<Style.Triggers><Trigger Property="IsMouseOver" Value="True"><Setter Property="Opacity" Value="70"/></Trigger></Style.Triggers>
But it doesn't work so far.
Maybe someone has some suggestions for me. Thanks!