I expect ScrollBar value changed by 1, so I set SmallChange is 1,But it is invalid to change value of ScrollBar.
<ScrollBar Minimum="0" Maximum="20" Value="0" SmallChange="1" ValueChanged="ScrollBar_ValueChanged"></ScrollBar>
private 开发者_JS百科void ScrollBar_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
double t = (sender as ScrollBar).Value;
}
Drag thump,But t is not 0,1.0,2.0,3.0......,
SmallChange is how much Value changes when you click on one of the arrows. When you drag the thumb, the change depends on Maximum, Minimum, the number of pixels the thumb can move and the number of pixels you actually dragged the thumb. For example if the thumb can move 100 pixels and you drag it for one pixel, then Value changes by (Maximum - Minimum)/100.
精彩评论