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 中的一個屬性。

範例

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

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 ,再呼叫 GetPropertyValue 方法或 SetPropertyValue 方法。

適用於