怎么使WPF的TreeView节点之间有连线
1个回答
展开全部
private static void TreeView1_Expanded(object sender, RouterEventArgs e){ var tvItem = (TreeViewItem)e.OriginalSource; var itemCount = VisualTreeHelper.GetChildrenCount(tvItem) for (var i = itemCount-1; i>=0; i--) { var child = VisualTreeHelper.GetChild(tvItem, i); ((FrameworkElement)child).BringIntoView(); } } 再参考下面的/questions/2946954/make-listview-scrollintoview-scroll-the-item-into-the-center-of-the-listview-c
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询