VisualInteractionSource.PointerWheelConfig 属性

定义

获取指针滚轮输入的配置。

public:
 property InteractionSourceConfiguration ^ PointerWheelConfig { InteractionSourceConfiguration ^ get(); };
InteractionSourceConfiguration PointerWheelConfig();
public InteractionSourceConfiguration PointerWheelConfig { get; }
var interactionSourceConfiguration = visualInteractionSource.pointerWheelConfig;
Public ReadOnly Property PointerWheelConfig As InteractionSourceConfiguration

属性值

指针滚轮输入的配置。

Windows 要求

设备系列
Windows 10, version 1809 (在 10.0.17763.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v7.0 中引入)

注解

默认情况下,VisualInteractionSource 对所有输入类型使用相同的配置。 此属性允许你为指针滚轮输入提供不同的配置。

例如,可以使用触摸和触摸板输入来控制 (X、Y) 和缩放的平移,但仅对缩放使用指针滚轮输入。 在这种情况下,可以重写 PositionXSourceModePositionYSourceMode 的配置,以仅将其禁用为指针滚轮输入。

// Set the defaults for the VisualInteractionSource.
interactionSource.PositionXSourceMode = InteractionSourceMode.EnabledWithInertia;
interactionSource.PositionYSourceMode = InteractionSourceMode.EnabledWithInertia;
interactionSource.ScaleSourceMode = InteractionSourceMode.EnabledWithInertia;

// Modify the pointer wheel configuration to disable X and Y.
interactionSource.PointerWheelConfig.PositionXSourceMode =
    InteractionSourceRedirectionMode.Disabled;
interactionSource.PointerWheelConfig.PositionYSourceMode =
    InteractionSourceRedirectionMode.Disabled;

适用于