This should do:
http://stackoverflow.com/questions/7796700/changing-button-image-when-isenabled 

From: [email protected]
To: [email protected]
Subject: Another binding question
Date: Sun, 8 Jan 2012 15:29:23 +1100



Folks, (anyone working today?) in my WPF app I have an image and a "Save" 
button next to each other like this: <StackPanel Orientation="Horizontal">  
<Image Width="28" Source="{Binding ??????????}"/>  <Button Content="Save" 
IsEnabled="{Binding AllowSave,RelativeSource={RelativeSource FindAncestor, 
AncestorType={x:Type UserControl}}}"/></StackPanel> I want to change the Image 
source automatically when the IsEnabled state of the button changes. I have 
"clean" and "dirty" images to flip between. I guess there is a binding syntax I 
can use to make this happen, but for the life of me I can’t figure it out. Does 
anyone know the trick?

Greg                                      

Reply via email to