WPF的DataGrid - 如何把注意力集中在DataGrid的底部添加新行? [英] WPF DataGrid - How to stay focused on the bottom of the DataGrid as new rows are added?

查看:439
本文介绍了WPF的DataGrid - 如何把注意力集中在DataGrid的底部添加新行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 的DataGrid WPF工具包和我需要能够维持焦点在网格的底部(即最后一行)。我在现在的问题是,作为行被添加滚动条为的DataGrid 不与被添加的新行一起滚动。什么是实现这一目标的最好方法是什么?

I am using DataGrid from the WPF Toolkit and I need to be able to maintain focus on the bottom of the grid (i.e. the last row). The problem I'm having right now is that as rows are added the scrollbar for the DataGrid doesn't scroll along with the new rows being added. What's the best way to accomplish this?

推荐答案

看起来像<一个href="http://msdn.microsoft.com/en-us/library/cc673083%28VS.95%29.aspx"><$c$c>DataGrid.ScrollIntoView(<item>)将继续把重点放在底部的的DataGrid

这篇关于WPF的DataGrid - 如何把注意力集中在DataGrid的底部添加新行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆