I have Image
<Image HorizontalAlignment="Left" VerticalAlignment="Top" Source="" Width="20" Height="20" />
and I have variable bool IsOk in codebehind.
How can I bind it to source property and have condition that when it is true source will be “../Shared/Images/ok.png” and when false “../Shared/Images/cancel.png”?
Can I use to it triggers?
Marty’s answer is clean, but if you really just feel like using a trigger…something like this might work also, but like I said, Marty’s is cleaner. 🙂