StylusButton.Guid 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
拿到 Guid 代表觸控筆按鈕的那個。
public:
property Guid Guid { Guid get(); };
public Guid Guid { get; }
member this.Guid : Guid
Public ReadOnly Property Guid As Guid
屬性值
代表 Guid 觸控筆按鈕的屬性。
範例
以下檢查使用者是否按下觸控筆的桶狀按鈕。
void OnStylusButtonDown(object sender, StylusButtonEventArgs e)
{
StylusButton myStylusButton = e.StylusButton;
if (myStylusButton.Guid == StylusPointProperties.BarrelButton.Id)
{
// the barrel button on the stylus has been pressed
}
}
Private Sub OnStylusButtonDown(ByVal sender As Object, ByVal e As StylusButtonEventArgs)
Dim myStylusButton As StylusButton = e.StylusButton
If myStylusButton.Guid = StylusPointProperties.BarrelButton.Id Then
' the barrel button on the stylus has been pressed
End If
End Sub
備註
此特性的價值保證在系統上的觸控筆按鈕中獨一無二。