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

傳回

如果指定的 StylusPointProperty 在目前的 StylusPoint 中,則為 true,否則為 false

範例

下列範例會先檢查手寫筆點屬性是否存在,再取得屬性值。 這個範例假設有名為pointStylusPoint的 。

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 包含指定的屬性,請先呼叫 ,再呼叫 HasPropertyGetPropertyValue 方法或 SetPropertyValue 方法。

適用於