Change CanExecuteRoutedEventArgs
to ExecutedRoutedEventArgs
private void CommandEnterKeyPressedExecuted(object sender, CanExecuteRoutedEventArgs e)
Should be
private void CommandEnterKeyPressedExecuted(object sender, ExecutedRoutedEventArgs e)
CanExecuteRoutedEventArgs
is used for CanExecute
event. You should also remove this line
private static RoutedUICommand CommandEnterKeyPressed;
and leave only public declaration of your RoutedUICommand