語言

StylusButton.Guid 屬性

定義

拿到 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

備註

此特性的價值保證在系統上的觸控筆按鈕中獨一無二。

適用於