C
C#3y ago
ApathyErr

❔ WPF how do I recolor the icon on hover?

I repainted the background of the button that uses the icon using this code, but I can't apply it to the icon.
6 Replies
JakenVeina
JakenVeina3y ago
what icon?
ApathyErr
ApathyErrOP3y ago
<Style x:Key="menuButtonIcon" TargetType="fa:IconImage">
<Setter Property="Foreground" Value="{Binding Path=Tag, RelativeSource={RelativeSource AncestorType=RadioButton}}"/>
<Setter Property="Width" Value="22"/>
<Setter Property="Height" Value="22"/>
<Setter Property="Margin" Value="35,0,20,0"/>
</Style>
<Style x:Key="menuButtonIcon" TargetType="fa:IconImage">
<Setter Property="Foreground" Value="{Binding Path=Tag, RelativeSource={RelativeSource AncestorType=RadioButton}}"/>
<Setter Property="Width" Value="22"/>
<Setter Property="Height" Value="22"/>
<Setter Property="Margin" Value="35,0,20,0"/>
</Style>
JakenVeina
JakenVeina3y ago
is that actually an image?
ApathyErr
ApathyErrOP3y ago
yes they are from the "fontawesome sharp" add-on
JakenVeina
JakenVeina3y ago
you can't recolor an image that just doesn't even make sense images are static, by definition, and don't have just one color
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?