Nick, as soon as I looked at your sample I was sure it would work because it
looks correct and sensible, but alas no. It produces no binding warnings or
runtime errors, but nothing happens and the image doesn't change. However,
it must be damn close and I'll work on it later. I'll re-read some cheat
sheets and samples in my books. The trouble with binding is that unless you
see specific errors coming out of the debug widow you have absolutely no
idea what is going right or wrong. Are there some binding debugging
techniques I'm not aware of? -- Greg
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Margin="4"
VerticalAlignment="Center" >
<Image x:Name="imgSave" Width="28" Margin="0,0,6,0" Source="Clean.png">
<Image.Style>
<Style>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=btnSave,
Path=IsEnabled}" Value="false">
<Setter Property="Image.Source" Value="Dirty.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
<Button x:Name="btnSave" ToolTip="Save the data" Content="Save"
Padding="8,3,8,3" Margin="0,0,0,0"
IsEnabled="{Binding AllowSave,RelativeSource={RelativeSource
FindAncestor, AncestorType={x:Type UserControl}}}">
</Button>
</StackPanel>