StylusPoint.GetPropertyValue(StylusPointProperty) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳指定屬性的值。
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 再呼叫 方法 GetPropertyValue 或 方法 SetPropertyValue 。