I learnt about WPF CommandTarget

I came across a very strange issue in WPF. I had a user control that can populate another area of a parent window. Adding buttons programmatically which used RoutedUICommands didn’t evaluate whether they should display or not.

It turns out it was down to the command target. I needed to set the command target on the button to the user control.

This article helped track it down …