开发者

Get scroll Position Percentage

开发者 https://www.devze.com 2023-03-29 19:02 出处:网络
I need to be able to determine when the user has scrolled through 60% of t开发者_运维技巧he content in a panel and I\'m not having much luck finding a solution for this.

I need to be able to determine when the user has scrolled through 60% of t开发者_运维技巧he content in a panel and I'm not having much luck finding a solution for this.

Thanks in advance for any ideas.


On Panel's Scroll Event, you can do

double scrollPercentage = (double) 
                scrollbar.VerticalScroll.Value / scrollBar.VerticalScroll.Maximum;

if (scrollPercentage > 0.6)
{
    ...
}
0

精彩评论

暂无评论...
验证码 换一张
取 消