แก้ไข

แชร์ผ่าน


Mouse.MouseWheelDeltaForOneLine Field

Definition

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

public: int MouseWheelDeltaForOneLine = 120;
public const int MouseWheelDeltaForOneLine = 120;
val mutable MouseWheelDeltaForOneLine : int
Public Const MouseWheelDeltaForOneLine As Integer  = 120

Field Value

Value = 120

Remarks

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.

Applies to

See also