Description
WPF handles WM_MOUSEWHEEL but this is only vertical wheel movement. It also needs to handle WM_MOUSEHWHEEL to handle horizontal wheel movement.
This isn't an obscure request; many of the mice that support horizontal wheel scrolling aren't using a physical wheel per se but a touch sensor on the middle mouse button to track finger scrolling in 4 directions. Another variation is the vertical physical wheel that tilts to the left or right for horizontal scrolling. Visual Studio is a WPF application that supports horizontal mouse scrolling in the editor but obviously not through the framework. We can get this generalized very cheaply.
System.Windows.Input.Mouse has these members for vertical wheel scrolling:
public readonly static RoutedEvent PreviewMouseWheelEvent;
public readonly static RoutedEvent MouseWheelEvent;
It will need to add:
public readonly static RoutedEvent PreviewMouseHorizontalWheelEvent;
public readonly static RoutedEvent MouseHorizontalWheelEvent;
Other public-facing classes that would need to change downwind for this to be generally available:
UIElement
UIElement3D
ContentElement
ScrollViewer
Etc. It's basically uncontroversial boilerplate which is mostly copy-paste of the code for vertical scrolling, with minimal risk of side effects. The vertical and horizontal scrolling could theoretically be combined into a single event to allow diagonal scrolling, but Win32 reports vertical and horizontal scrolling separately from one another. Built-in controls could add high-level support for horizontal wheel scrolling on an ad-hoc basis, but opening this up will allow third-party developers to add support quickly at their own pace.