I find it is scrolling too much at a time when the mouse 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类使用IScrollInfo界面,并且有2种方法.ScrollViewer class uses IScrollInfo interface and there are 2 methods.((IScrollInfo)myPanel).LineUp();// and LineDown()在UIElement.MouseWheel事件中添加一种方法,并旋转一个==面板的一个子代.Add a method to UIElement.MouseWheel event and one rotation == one children of a panel. ...或者您可以使用:...or you could use: myScrollviewer.ScrollToVerticalOffset(offset); 这篇关于是否可以在WPF ScrollViewer上调整鼠标滚轮滚动距离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-24 06:34