Answers for "wpf scoll to on new item datagrtid"

C#
0

wpf scoll to on new item datagrtid

if (mainDataGrid.Items.Count > 0)
{
    var border = VisualTreeHelper.GetChild(mainDataGrid, 0) as Decorator;
    if (border != null)
    {
        var scroll = border.Child as ScrollViewer;
        if (scroll != null) scroll.ScrollToEnd();
    }
}
Posted by: Guest on January-27-2021

C# Answers by Framework

Browse Popular Code Answers by Language