Share via


StylusButton.Guid Propriété

Définition

Obtient le Guid qui représente le bouton de stylet.

public:
 property Guid Guid { Guid get(); };
public Guid Guid { get; }
member this.Guid : Guid
Public ReadOnly Property Guid As Guid

Valeur de propriété

La propriété Guid qui représente le bouton de stylet.

Exemples

L’exemple suivant vérifie si l’utilisateur a appuyé sur le bouton barillet d’un stylet.

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

Remarques

La valeur de cette propriété est garantie comme unique parmi les boutons de stylet sur le système.

S’applique à