Greg, I expect you changed the image sources back to your original bindings... > binding debugging techniques The main one for debugging bindings (if the basics are in place) is using a DebugConverter. An IValueConverter that just returns the input value - but you can put breakpoints in and see what is being passed in. This may be obvious but the binding errors also come up in the Output during debug... Nic
From: [email protected] To: [email protected] Subject: RE: Another binding question Date: Mon, 9 Jan 2012 21:01:15 +1100 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>
