如何禁用ScrollBar
何时编辑单元格?也许您可以向DataGrid.BeginningEdit
事件添加处理程序并禁用ScrollBar
那里?
ScrollViewer.SetHorizontalScrollBarVisibility(dataGrid, ScrollBarVisibility.Disabled);
ScrollViewer.SetVerticalScrollBarVisibility(dataGrid, ScrollBarVisibility.Disabled);