开发者

Is it possible to adjust mouse wheel scroll distance on a WPF ScrollViewer?

开发者 https://www.devze.com 2023-01-09 13:52 出处:网络
I find it is scrolling too much at a time when the m开发者_StackOverflow社区ouse scroll wheel is used. I have a very short ScrollViewer (one line tall) that contains a few lines of items in a WrapPane

I find it is scrolling too much at a time when the m开发者_StackOverflow社区ouse scroll wheel is used. I have a very short ScrollViewer (one line tall) that contains a few lines of items in a WrapPanel, and it is scrolling right to the bottom in one "tick" so that the middle line is never visible.


Not nice solution but you could add a few panes with text - one panel each line

ScrollViewer class uses IScrollInfo interface and there are 2 methods.

((IScrollInfo)myPanel).LineUp();// and LineDown()

Add a method to UIElement.MouseWheel event and one rotation == one children of a panel.

...or you could use:

 myScrollviewer.ScrollToVerticalOffset(offset);
0

精彩评论

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