VisualInteractionSource.PointerWheelConfig 属性

定义

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

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

属性值

指针滚轮输入的配置。

注解

默认情况下,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;

适用于