ScrollChanged事件? [英] ScrollChanged event?

查看:174
本文介绍了ScrollChanged事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WPF中有一个ScrollViewer.ScrollChanged事件,当列表框中的滚动视图发生变化时会通知您。我在Metro的任何地方都没有发现此事件,所以我的问题是如何检测滚动?我试图找出ISupportPlaceholder
,但它显示的唯一示例代码实际上并没有使用它。我试图让控件通知代码后面的C#视图更改,而不是相反。

In WPF there was a ScrollViewer.ScrollChanged event that would notify you whenever the scroll view changed in a listbox, etc. I have not found this event anywhere in Metro so my question is how do I detect a scroll? I tried to figure out ISupportPlaceholder but the only sample code that it shows up in does not actually use it. I'm trying to get the control to notify the C# behind code on view changes, not the other way around.

推荐答案

您是否尝试过ScrollViewer的ViewChanged事件?我记得我们在我们的一个内部设计讨论中辩论过ScrollChanged并认为有一个事件对于视图改变的情况是中立的(滚动是
只有一个的几种方式只要开发人员可以从该上下文中查询适当的ScrollViewer属性,这种情况就更好了。

Have you tried the ScrollViewer's ViewChanged event? I recall we debated having ScrollChanged in one of our internal design discussions and figured having an event that was neutral to the circumstance in which the view changed (with scrolling being only one of the several ways this happens) was better as long as it was possible for developers to query appropriate ScrollViewer properties from within that context.

除此之外,还有一些实现IScrollInfo的面板,可以为您提供等效的滚动数据粒度。

As an aside there are a few panels that implement IScrollInfo, which can give you equivalent granularity of scroll data.


这篇关于ScrollChanged事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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