检测 WPF FrameworkElement 是否滚动
我刚刚发现了 FrameworkElement.BringIntoView 方法,该方法非常有用。
但是,我还希望能够检测某个元素是否确实在视图中。换句话说,一个函数告诉我,如果我调用 BringIntoView,是否必须进行滚动,或者相关元素是否已经在可视区域内。
谢谢。
I have just discovered the FrameworkElement.BringIntoView
method, which is very useful.
However, I would also like the ability to detect whether an element actually is in view or not. In other words, a function to tell me whether BringIntoView, if I called it, would have to do any scrolling or is the element in question already within the viewable area.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查这个
http://msdn.microsoft.com/en-us/library /system.windows.frameworkelement.aspx
我认为
IsFocused
属性可能会有所帮助。Check this
http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.aspx
I think the
IsFocused
property might be helpful.