WPF Debugging datatriggers? WPF Debugging datatriggers? wpf wpf

WPF Debugging datatriggers?


Try using WPF Inspector:

https://wpfinspector.codeplex.com/

Once you attach to your running WPF application, highlight the element in question by holding down ctrl + clicking on it. Then, select the element in the visual tree (might be a parent) that contains the trigger. Click on the triggers tab and you can see the current evaluation (e.g. True == True). If the datatrigger condition is met, the little icon will be orange (lit).


It looks ok to me, can you try altering the converter to return "red" or "green" rather than True/False (and alter the trigger accordingly). I have seen some wierd behaviour with WPF triggers when using NULL or Booleans in that it "unsets" the property if it's the opposite of your trigger value, rather than using another trigger value.

As for debugging them.. I'd love to know if there's a better way than the hack and hope methods I generally use for XAML debugging :D