Mouse::MouseWheelDeltaForOneLine Field

 

Represents the number of units the mouse wheel is rotated to scroll one line.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public:
literal int MouseWheelDeltaForOneLine

Field Value

Type: System::Int32

The units in one scroll line.

In the current Windows Presentation Foundation (WPF), the value of this field is 120. The intention of the field exposure is to allow for vendors to build finer-resolution mouse wheels in the future, that perhaps would include a freely rotating wheel without notches. The expectation is that such a device would send more messages per rotation, but with a smaller value in each message. To support this possibility, you should either add the incoming delta values until the MouseWheelDeltaForOneLine amount is reached (so for a delta-rotation you get the same response), or scroll partial lines in response to the more frequent messages. You could also choose your own scroll granularity and accumulate deltas of your own choosing until that delta is reached, or perhaps reference user-controllable system parameters for mouse sensitivity and extrapolate these to mouse wheel delta thresholds.

.NET Framework
Available since 3.0
Return to top
Show: