开发者

SmallChange is a property of ScrollBar,But it can not change scrollBar

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜