http://blog.csdn.net/abrahamcheng/article/details/7061813
/// <summary>
/// Get a bool value indicate whether is the VerticalScrollBar at buttom
/// </summary>
/// <returns>A bool value indicate whether is the VerticalScrollBar at buttom</returns>
public bool IsVerticalScrollBarAtButtom
{
get
{
bool isAtButtom = false;
// get the vertical scroll position
double dVer = this.VerticalOffset;
//get the vertical size of the scrollable content area
double dViewport = this.ViewportHeight;
//get the vertical size of the visible content area
double dExtent = this.ExtentHeight;
if (dVer != 0)
{
if (dVer + dViewport == dExtent)
{
isAtButtom = true;
}
else
{
isAtButtom = false;
}
}
else
{
isAtButtom = false;
}
if (this.VerticalScrollBarVisibility == ScrollBarVisibility.Disabled
|| this.VerticalScrollBarVisibility == ScrollBarVisibility.Hidden)
{
isAtButtom = true;
}
return isAtButtom;
}
}
这一段代码帮了我的大忙了。