【WPF】Datagrid显示最低下一跳

        ScrollViewer scroll;
        private void GridView_ScrollChanged(object sender, RoutedEventArgs e)
        {
            if (scroll == null)
            {
                DataGridAutomationPeer lvap = new DataGridAutomationPeer(sender as DataGrid);
                var svap = lvap.GetPattern(PatternInterface.Scroll) as ScrollViewerAutomationPeer;
                ScrollViewer scroll = svap.Owner as ScrollViewer;
                scroll.ScrollToBottom();
            }
        }

源:mulinyeyu

原文地址:https://www.cnblogs.com/oiliu/p/7831587.html