Implement MouseWheel support for Silverlight 3 controls

added by jmccurdy
1/29/2010 9:34:19 AM


In the upcoming Silverlight 4 release, mousewheel support for controls will be implemented out of the box. However Silverlight 3 still requires you to roll your own mouse wheel support. The following MouseWheelProps class provides generic mousewheel support for all Silverlight controls that support the IScrollProvider interface (ScrollViewer, ListBox, DataGrid) or the IRangeValueProvider interface (Slider). This class implements a single attached property called Enable that can be added directly to a control, or as a style for a control.