VisualInteractionSource.PointerWheelConfig 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取指针滚轮输入的配置。
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) 和缩放的平移,但仅对缩放使用指针滚轮输入。 在这种情况下,可以重写 PositionXSourceMode 和 PositionYSourceMode 的配置,以仅将其禁用为指针滚轮输入。
// 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;