1 // 将焦点定位到最后一行 2 var border = VisualTreeHelper.GetChild(yourDataGridName, 0) as Decorator; 3 if (border != null) 4 { 5 var scroll = border.Child as ScrollViewer; 6 if (scroll != null) scroll.ScrollToEnd(); 7 }