WPF在ListView上禁用鼠标滚轮滚动

问题描述:

我应该禁用某些ListBoxes(View = GridView)的鼠标滚轮滚动功能。WPF在ListView上禁用鼠标滚轮滚动

在标准的鼠标滚轮事件处理程序中设置handled=true不是一个选项,因为我需要在更高级别的滚动查看器(ListBox的父级)中处理鼠标滚轮事件。

有没有可能实现这一目标?

+0

可能重复的[在wpf中禁用鼠标滚轮的itemscontrol](http://stackoverflow.com/questions/2189053/disable-mouse-wheel-on-itemscontrol-in-wpf) – Chris 2016-08-08 10:13:27

请参见以下问题:

disable mouse wheel on itemscontrol in wpf

我认为你可以使用那里提供的解决方案。

+0

+1很好的解决方案,谢谢。 – HCL 2010-12-23 12:47:40