wpf的datagrid滚动条问题

小鸡白吃米 2016-07-06 04:58:08
用的是datagrid自带的滚动条,怎么判断滚动条滚到了最底部,希望各位指导一下
...全文
240 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
小鸡白吃米 2016-07-07
  • 打赏
  • 举报
回复
引用 2 楼 duanzi_peng 的回复:
判断ScrollViewer的垂直偏移量就行了。
嗯 确实 我试试
exception92 2016-07-07
  • 打赏
  • 举报
回复
判断ScrollViewer的垂直偏移量就行了。
小鸡白吃米 2016-07-06
  • 打赏
  • 举报
回复
已经解决了,用的是在网上参考的方法 public bool IsVerticalScrollBarAtButtom { get { bool isAtButtom = false; double dVer = this.ScroGrid.VerticalOffset;//this.VerticalOffset; double dViewport = this.ScroGrid.ViewportHeight; double dExtent = this.ScroGrid.ExtentHeight; if (dVer != 0) { if (dVer + dViewport == dExtent) { isAtButtom = true; } else { isAtButtom = false; } } else { isAtButtom = false; } if (this.ScroGrid.VerticalScrollBarVisibility == ScrollBarVisibility.Disabled || this.ScroGrid.VerticalScrollBarVisibility == ScrollBarVisibility.Hidden) { isAtButtom = true; } return isAtButtom; } } 这个是用的滚动条控件,控件自带的滚动条我还不知道怎么搞

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧