Well, the way I use RegisterClassCommandBinding is incorrect...
The right way to use it is:
CommandManager.RegisterClassCommandBinding(typeof(Button), new CommandBinding(MyCommand, MyCommandExecuted));
The first argument of RegisterClassCommandBinding is the target command source type, not the current class type...
If want to use this command in places other than buttons, use typeof(FrameworkElement)
.
But typeof(ICommandSource)
is not work.