This is a follow-up to a question I posted yesterday here. Binding to icons works, using the code-snippet posted by H.B., but I can't seem to figure out how to add a trigger condition to it so that a different icon will be displayed on mouseover. The current code looks like this:
xmlns:res="clr-namespace:MyProject.Resources"
xmlns:Helpers="clr-namespace:MyProject.Converters"
...
<Image Name="imgMin"
Grid.Column="0"
Stretch="UniformToFill"
Cursor="Hand"
MouseDown="imgMin_MouseDown">
<Image.Source>
<Binding Source="{x:Static res:AppResources.minimize}">
<Binding.Converter>
<Helpers:IconToImageSourceConverter/>
</Binding.Converter>
</Binding>
</Image.Source>
</Image>
What do I need to change here so that a different icon (res:AppResources.minimize_glow) is displayed on mouseover? I tried messing around with getting a trigger in there somewhere, but Image.Source doesn't accept another child, Binding doesn't support direct content, changing Image.Source to Image.Style doesn't work because Style cannot contain Binding... I'm running out of ideas here, and my Google-fu is failing to come up with anything useful. Besides, even if I could get a Trigger to work with this, putting a Binding to the highlighted icon into the Trigger would probably be my next headache. There has to be a way to do this, right?