为DataGrid 单元格样式追加如下
<DataGrid.Resources> <Style x:Key="ExDataGridCellStyle1" TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellStyle1}"> <EventSetter Event="RequestBringIntoView" Handler="DataGridCell_RequestBringIntoView"/> </Style> </DataGrid.Resources>
事件实现
private void DataGridCell_RequestBringIntoView(object sender, RequestBringIntoViewEventArgs e) { e.Handled = true; }