语言

StylusPoint.HasProperty(StylusPointProperty) 方法

定义

返回当前 StylusPoint 是否包含指定的属性。

public:
 bool HasProperty(System::Windows::Input::StylusPointProperty ^ stylusPointProperty);
public bool HasProperty(System.Windows.Input.StylusPointProperty stylusPointProperty);
member this.HasProperty : System.Windows.Input.StylusPointProperty -> bool
Public Function HasProperty (stylusPointProperty As StylusPointProperty) As Boolean

参数

stylusPointProperty
StylusPointProperty

要 StylusPointProperty 签入的 StylusPoint。

返回

如果指定的 值在当前 中,则为 。

示例

以下示例在获取属性的值之前检查触笔点属性是否存在。 此示例假定有一个 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。

适用于