鼠标滚动事件

时间:2011-05-29 17:39:27

标签: c# .net wpf

我有两个我想要做的TextBox:

当我在一个文本框中滚动鼠标时,它将滚动到第二个文本框中的相同位置,反之亦然。

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

这是一个链接,它将向您展示如何将滚动条绑定在一起:

http://www.mindscapehq.com/blog/index.php/2010/08/18/wpf-elements-how-to-build-a-multi-scheduler/

基本上,您可以将以下代码添加到滚动条的值中:

Value="{Binding VerticalOffset, Mode=TwoWay, ElementName=YourOtherScrollBar}"