When cell is in edit mode, pressings enter key calls infinitely CommitEdit Execute method in custom scenario.
1. When new item is added to the DataGrid source, the cell goes in edit mode
2. Pressing enter key executes additional logic and CommitEdit Execute method calls infinitely.
Workaround:
Inside the CommitEdit CanExecure method, call the default can execute logic
public override bool CanExecute(object parameter)
{
return this.Owner.CommandService.CanExecuteDefaultCommand(DataGridCommandId.CommitEdit, parameter);
//return true;
}