Share via


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

注釈

このプロパティの値は、システム上のスタイラス ボタン間で一意であることが保証されます。

適用対象