Is this any use? 

http://stackoverflow.com/questions/397117/wpf-image-dynamically-changing-ima
ge-source-during-runtime 

 

  _____  

Ian Thomas
Victoria Park, Western Australia

  _____  

From: [email protected] [mailto:[email protected]]
On Behalf Of Greg Keogh
Sent: Sunday, January 08, 2012 12:29 PM
To: 'ozDotNet'
Subject: Another binding question

 

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