WPF: how to make normal listbox left-drag-select behavior use middle mouse instead?
- by Scott Bilas
I'm building a special listbox control that our designers want customized in some tweaky ways.
One thing they want to see is that the middle button-drag does what the left button-drag normally does (we are repurposing left-drag to other things).
So it needs the two key features that left-drag does in a ListBox default implementation:
While holding down the button and dragging, the selection starts where I click down and extends to where I drag.
While dragging outside the listbox region, it scrolls if there is scrollable space in that direction.
Before I go an duplicate this functionality by hand, is there any easy way to fool ListBox into thinking it's getting left-mouse drag events but instead is getting middle-mouse?