Detect end of ScrollView programatically in Silverlight?

Deadly 提交于 2019-12-23 02:59:06

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/5809096/detect-end-of-scrollview-programatically-in-silverlight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!