StylusPointDescription 构造函数

定义

初始化 StylusPointDescription 类的新实例。

重载

StylusPointDescription()

初始化 StylusPointDescription 类的新实例。

StylusPointDescription(IEnumerable<StylusPointPropertyInfo>)

使用指定的 StylusPointDescription 对象初始化 StylusPointPropertyInfo 类的新实例。

StylusPointDescription()

初始化 StylusPointDescription 类的新实例。

public:
 StylusPointDescription();
public StylusPointDescription ();
Public Sub New ()

示例

以下示例创建 一个 StylusPointDescription 对象,并使用它来创建 StylusPoint

StylusPointDescription newDescription =
      new StylusPointDescription(new StylusPointPropertyInfo[]
                    {
                        new StylusPointPropertyInfo(StylusPointProperties.X),
                        new StylusPointPropertyInfo(StylusPointProperties.Y),
                        new StylusPointPropertyInfo(StylusPointProperties.NormalPressure),
                        new StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.BarrelButton)
                    });

int[] propertyValues = { 1800, 1000, 1 };

StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription As New StylusPointDescription( _
    New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _
                                   New StylusPointPropertyInfo(StylusPointProperties.Y), _
                                   New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _
                                   New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _
                                   New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _
                                   New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)})

Dim propertyValues As Integer() = {1800, 1000, 1}

Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)

注解

无参数构造函数创建一个 StylusPointDescription ,其中包含属性 XYNormalPressure的信息。

适用于

StylusPointDescription(IEnumerable<StylusPointPropertyInfo>)

使用指定的 StylusPointDescription 对象初始化 StylusPointPropertyInfo 类的新实例。

public:
 StylusPointDescription(System::Collections::Generic::IEnumerable<System::Windows::Input::StylusPointPropertyInfo ^> ^ stylusPointPropertyInfos);
public StylusPointDescription (System.Collections.Generic.IEnumerable<System.Windows.Input.StylusPointPropertyInfo> stylusPointPropertyInfos);
new System.Windows.Input.StylusPointDescription : seq<System.Windows.Input.StylusPointPropertyInfo> -> System.Windows.Input.StylusPointDescription
Public Sub New (stylusPointPropertyInfos As IEnumerable(Of StylusPointPropertyInfo))

参数

stylusPointPropertyInfos
IEnumerable<StylusPointPropertyInfo>

类型为 StylusPointPropertyInfo 的泛型 IEnumerable,用于指定 StylusPointDescription 中的属性。

示例

以下示例创建 一个 StylusPointDescription 对象,并使用它来创建 StylusPoint

StylusPointDescription newDescription =
      new StylusPointDescription(new StylusPointPropertyInfo[]
                    {
                        new StylusPointPropertyInfo(StylusPointProperties.X),
                        new StylusPointPropertyInfo(StylusPointProperties.Y),
                        new StylusPointPropertyInfo(StylusPointProperties.NormalPressure),
                        new StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.BarrelButton)
                    });

int[] propertyValues = { 1800, 1000, 1 };

StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription As New StylusPointDescription( _
    New StylusPointPropertyInfo() {New StylusPointPropertyInfo(StylusPointProperties.X), _
                                   New StylusPointPropertyInfo(StylusPointProperties.Y), _
                                   New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _
                                   New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _
                                   New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _
                                   New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)})

Dim propertyValues As Integer() = {1800, 1000, 1}

Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)

注解

必须传入 StylusPointPropertyInfo 属性 XYNormalPressure的 对象。

适用于