StylusPoint.GetPropertyValue(StylusPointProperty) 方法

定义

返回指定属性的值。

public:
 int GetPropertyValue(System::Windows::Input::StylusPointProperty ^ stylusPointProperty);
public int GetPropertyValue(System.Windows.Input.StylusPointProperty stylusPointProperty);
member this.GetPropertyValue : System.Windows.Input.StylusPointProperty -> int
Public Function GetPropertyValue (stylusPointProperty As StylusPointProperty) As Integer

参数

stylusPointProperty
StylusPointProperty

指定要 StylusPointProperty 获取的属性值。

返回

指定的 StylusPointProperty值。

例外

stylusPointProperty不是其中一个属性。Description

示例

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

if (point.HasProperty(StylusPointProperties.PitchRotation))
{
    int pitchRotation = point.GetPropertyValue(StylusPointProperties.PitchRotation);
}
If point.HasProperty(StylusPointProperties.PitchRotation) Then
    Dim pitchRotation As Integer = _
            point.GetPropertyValue(StylusPointProperties.PitchRotation)
End If

注解

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

适用于