WPF 调节树状图滚动条值

TreeViewAutomationPeer lvap = new TreeViewAutomationPeer(this.TreeViewOrg);
var svap = lvap.GetPattern(PatternInterface.Scroll) as ScrollViewerAutomationPeer;
if (svap!=null)
{
var scroll = svap.Owner as ScrollViewer;

double value = this.Vslider.Value * (scroll.ScrollableHeight / 100);
scroll.ScrollToVerticalOffset(value); //向下调节垂直滚动条的位置;
}
原文地址:https://www.cnblogs.com/mamaxiaoling/p/11439264.html