MouseWheelParameters MouseWheelParameters MouseWheelParameters MouseWheelParameters Class

Provides properties associated with the button wheel of a mouse device.

Syntax

Declaration

public sealed class MouseWheelParameterspublic sealed class MouseWheelParametersPublic NotInheritable Class MouseWheelParameters

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 summary

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).

Gets or sets a value that indicates the change in the angle of rotation associated with input from the wheel button of a mouse.

Gets or sets a value that indicates the change in scale associated with input from the wheel button of a mouse.

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).

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

    Property Value

    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).

    Mouse properties dialog with wheel settings displayed

    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

    Property 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

    Property 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

    Property Value

    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).

    Mouse Properties dialog with wheel settings displayed

    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.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute

Details

Assembly

Windows.UI.Input.dll