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;

適用於