InkInputConfiguration 类

定义

管理哪些类型的辅助输入可由 InkPresenter 对象处理。

public ref class InkInputConfiguration sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InkInputConfiguration final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InkInputConfiguration
Public NotInheritable Class InkInputConfiguration
继承
Object Platform::Object IInspectable InkInputConfiguration
属性

Windows 要求

设备系列
Windows 10, version 1803 (在 10.0.17134.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v6.0 中引入)

示例

此处,我们展示了如何接受来自笔、触摸和鼠标设备的墨迹输入,但忽略笔桶按钮和橡皮擦笔尖的所有输入。

public ScenarioBarrelEraserIgnore() 
{ 
    this.InitializeComponent(); 
    var inkPresenter = inkCanvas.InkPresenter; 
    inkPresenter.InputDeviceTypes = 
        Windows.UI.Core.CoreInputDeviceTypes.Pen |  
        Windows.UI.Core.CoreInputDeviceTypes.Touch | 
        Windows.UI.Core.CoreInputDeviceTypes.Mouse; 

    InkInputConfiguration inkInputConfiguration = 
        inkPresenter.InputConfiguration; 
    inkInputConfiguration.IsEraserInputEnabled = false; 
    inkInputConfiguration.IsPrimaryBarrelButtonInputEnabled = false; 
} 

注解

若要管理应用处理辅助输入的方式,请参阅 InkInputProcessingConfiguration

属性

IsEraserInputEnabled

获取或设置 InkPresenter 对象是否处理来自笔的橡皮擦笔尖的输入。

IsPenHapticFeedbackEnabled

获取或设置是否为活动笔启用触觉反馈。

IsPrimaryBarrelButtonInputEnabled

获取或设置 InkPresenter 对象是否处理来自笔的主桶按钮的输入。

适用于

另请参阅