MouseWheelParameters
MouseWheelParameters
MouseWheelParameters
MouseWheelParameters
Class
Definition
Provides properties associated with the button wheel of a mouse device.
public : sealed class MouseWheelParameters : IMouseWheelParameterspublic sealed class MouseWheelParameters : IMouseWheelParametersPublic NotInheritable Class MouseWheelParameters Implements IMouseWheelParameters// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
The properties exposed through MouseWheelParameters are used in conjunction with the Wheel settings in the Mouse control panel to define the UI experience when using the button wheel.
The mouse wheel button has discrete, evenly spaced notches or distance thresholds (also called detents). When you rotate or tilt the wheel, a wheel message is sent as each detent is encountered.
Note
: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).
Properties
CharTranslation CharTranslation CharTranslation CharTranslation
Gets or sets the device-independent pixel (DIP) conversion factors for both character width and line height units (as set in the Wheel settings of the Mouse control panel).
public : Point CharTranslation { get; set; }public Point CharTranslation { get; set; }Public ReadWrite Property CharTranslation As Point// You can use this property in JavaScript.
The conversion factors for the character width (x) and line height (y).
Remarks
The following image shows the default control panel settings for the button wheel. These settings map a single detent to a specific unit of distance in the UI (character width and line height). CharTranslation provides the means to redefine these distances and specify them in terms of device-independent pixel (DIP).

If the wheel button is set to scroll three lines at a time for each detent and the value of CharTranslation is set to (8,16), vertical scrolling is applied at 3 x 16 = 48 device-independent pixel (DIP) per detent. Horizontal scrolling through the mouse tilt wheel is applied at 3 x 8 = 24 device-independent pixel (DIP) per detent.
Note
If ManipulationTranslateY/ManipulationTranslateRailsY is disabled and ManipulationTranslateX/ManipulationTranslateRailsX is enabled through GestureSettings then scrolling is applied only along the horizontal axis when the button wheel is rotated or tilted. Similarly, if ManipulationTranslateY/ManipulationTranslateRailsY is enabled and ManipulationTranslateX/ManipulationTranslateRailsX is disabled through GestureSettings then scrolling is applied only along the vertical axis when the button wheel is rotated or tilted.
DeltaRotationAngle DeltaRotationAngle DeltaRotationAngle DeltaRotationAngle
Gets or sets a value that indicates the change in the angle of rotation associated with input from the wheel button of a mouse.
public : float DeltaRotationAngle { get; set; }public float DeltaRotationAngle { get; set; }Public ReadWrite Property DeltaRotationAngle As float// You can use this property in JavaScript.
- Value
- float float float float
A value between 0.0 and 359.0 in degrees of rotation. The default value is 0.0.
Remarks
DeltaRotationAngle maps a single detent to the specified angle.
Rotating the wheel button forward or tilting it to the right results in a clockwise rotation. Rotating backward or tilting to the left results in a counter-clockwise rotation.
DeltaScale DeltaScale DeltaScale DeltaScale
Gets or sets a value that indicates the change in scale associated with input from the wheel button of a mouse.
public : float DeltaScale { get; set; }public float DeltaScale { get; set; }Public ReadWrite Property DeltaScale As float// You can use this property in JavaScript.
- Value
- float float float float
The relative change in scale, in degrees.
Remarks
DeltaScale maps a single notch (unitary rotation) of the wheel button to a scale multiplier or divider (for example, 1.1).
Rotating the wheel button forward or tilting it to the right results in a scale increase. Rotating backward or tilting to the left results in a scale decrease.c++javascript
PageTranslation PageTranslation PageTranslation PageTranslation
Gets or sets the device-independent pixel (DIP) conversion factors for both page width and height units (as set in the Wheel settings of the Mouse control panel).
public : Point PageTranslation { get; set; }public Point PageTranslation { get; set; }Public ReadWrite Property PageTranslation As Point// You can use this property in JavaScript.
Remarks
The following image shows the default control panel settings for the button wheel. These settings map a single detent to a specific unit of distance in the UI (page width and height). PageTranslation provides the means to redefine these distances and specify the size of a page in terms of device-independent pixel (DIP).

If the wheel button is set to scroll one screen (page) at a time for each detent and the value of PageTranslation is set to (1200,800), vertical scrolling is applied at 1 x 800 device-independent pixel (DIP) per detent. Horizontal scrolling distance through the mouse tilt wheel is dependent on the value of CharTranslation.
Note
If ManipulationTranslateY/ManipulationTranslateRailsY is disabled and ManipulationTranslateX/ManipulationTranslateRailsX is enabled through GestureSettings then scrolling is applied only along the horizontal axis when the button wheel is rotated or tilted. In the previous example, the result is horizontal scrolling of 1 x 1200 device-independent pixel (DIP) per detent. Similarly, if ManipulationTranslateY/ManipulationTranslateRailsY is enabled and ManipulationTranslateX/ManipulationTranslateRailsX is disabled through GestureSettings then scrolling is applied only along the vertical axis when the button wheel is rotated or tilted.
- See Also
See Also
- Custom user interactions
- UX guidelines for custom user interactions
- Touch design guidelines
- User interaction mode sample
- Focus visuals sample
- Input: Device capabilities sample
- Input: Ink sample
- Input: Manipulations and gestures (JavaScript) sample
- Input: Simplified ink sample
- Input: Windows 8 gestures sample
- Input: XAML user input events sample
- XAML scrolling, panning, and zooming sample
- DirectX touch input sample
- Input: Manipulations and gestures (C++) sample
- Input: Touch hit testing sample
- Input source identification sample
- Touch injection sample
- Win32 touch hit-testing sample