StylusPoint.SetPropertyValue(StylusPointProperty, Int32) 方法

定义

将指定属性设置为指定值。

public:
 void SetPropertyValue(System::Windows::Input::StylusPointProperty ^ stylusPointProperty, int value);
public void SetPropertyValue(System.Windows.Input.StylusPointProperty stylusPointProperty, int value);
member this.SetPropertyValue : System.Windows.Input.StylusPointProperty * int -> unit
Public Sub SetPropertyValue (stylusPointProperty As StylusPointProperty, value As Integer)

参数

stylusPointProperty
StylusPointProperty

指定要 StylusPointProperty 设置的属性值。

value
Int32

属性的值。

例外

stylusPointProperty不是其中一个属性。Description

示例

以下示例在设置属性值之前检查触笔点属性是否存在。 此示例假定有一个 StylusPoint 调用 point

if (point.HasProperty(StylusPointProperties.PitchRotation))
{
    point.SetPropertyValue(StylusPointProperties.PitchRotation, 1000);
}
If point.HasProperty(StylusPointProperties.PitchRotation) Then
    point.SetPropertyValue(StylusPointProperties.PitchRotation, 1000)
End If

注解

若要检查StylusPoint包含指定属性,请在调用方法或HasProperty方法之前调用GetPropertyValueSetPropertyValue

适用于