StylusButton.Guid Propriété

Définition

Obtient le Guid bouton représentant le 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é

Propriété Guid qui représente le bouton stylet.

Exemples

L’exemple suivant vérifie si l’utilisateur a appuyé sur le bouton tonneau sur 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 d’être unique parmi les boutons de stylet sur le système.

S’applique à