当DataGrid属于单元格选中时出现红框,是因为WPF中DataGrid拥有默认的验证属性,如需关闭,请在DataGrid中加入以下属性:
Validation.ErrorTemplate="{x:Null}"
搬运转发请链接注明出处。