There are two different ideas about the element which plays role of default command target in the “WPF Control Development” book:
Page 258» A command target is the object on which the command is
raised. ICommandSource interface contains a CommandTarget property
that can be set to a specific object. By default, the command source
itself is considered the command target.Page 262» By default, when the CommandTarget is not set, the element
with the keyboard focus is used.
Furthermore, at this tutorial, we can leave menu items and buttons command target undefined while menu items only (i.e. and not buttons) can detect command target truly. So what’s the default command target?!
I think I just understood what this means:
If an element is focusable, it means that it will always have keyboard focus when it is activated in order to raise a command. Thus, if it has a CommandBinding for the Command, it will always handle it itself, and if it hasn’t it will always be disabled.
However, you can get around this by setting FocusManager.IsFocusScope to true on the control’s container, like in this XAML: