在 Silverlight 中以编程方式检测 ScrollView 的结尾? [英] Detect end of ScrollView programatically in Silverlight?

查看:42
本文介绍了在 Silverlight 中以编程方式检测 ScrollView 的结尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 WPF 的新手,我遇到了一些问题.

我有一个 ScrollView 和一个 RepeatButton.当 ScrollView 一直向左或一直向右移动时,我想以编程方式禁用 RepeatButton.在 Silverlight 中是否有一种简单的方法可以做到这一点?

我找到了这个页面:http:///msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer.scrollchanged.aspx 并正在考虑为此添加一个事件侦听器,但我不知道这是否是最好的解决问题的方法.

谢谢各位!如果您需要代码示例或任何内容,请告诉我.

解决方案

可能您想分别查看 Horizo​​ntalOffsetScrollableWidth 或 Vertical/Height.

如果 Offset 等于 Scrollable 维度,那么您不想显示它...我个人还是会保留它,因为您的建议并不是真正的标准行为,这通常不是很好因为用户不期望它.

I am new to WPF and I am having some issues with this.

I have a ScrollView and a RepeatButton. I want to disable the RepeatButton programatically when the ScrollView has moved all the way left or all the way right. Is there an easy way to do this in Silverlight?

I found this page: http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer.scrollchanged.aspx and was thinking of adding an event listener for this, but I don't know if that is the best way to tackle the problem.

Thanks guys! Please let me know if you need code samples or anything.

解决方案

Probably you want to look at the HorizontalOffset and the ScrollableWidth or Vertical/Height respectively.

if the Offset is equal to the Scrollable dimension, then you don't want to display it... Personally I'd leave it though because what you're suggesting isn't really standard behavior, which is not usually good because the the user does not expect it.

这篇关于在 Silverlight 中以编程方式检测 ScrollView 的结尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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