How do you enable WPF to respond to horizontal scrolling using the mouse tilt wheel? For example, I have a Microsoft Explorer mini mouse and have tried horizontally scrolling content contained within a ScrollViewer with
HorizontalScrollBarVisibility="Visible"
but the content will not scroll horizontally. Vertical scrolling, however, works reliably as usual.
If such input is not directly supported by WPF at this time, is there a way to do this using interop with unmanaged code?
Thanks!
Call the AddHook() method in your Window constructor so you can spy on the messages. Look for WM_MOUSEHWHEEL, message 0x20e. Use wParam.ToInt32() >> 16 to get the movement amount, a multiple of 120.