Share via


StylusButton.Guid Proprietà

Definizione

Ottiene l'oggetto Guid che rappresenta il pulsante dello stilo.

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

Valore della proprietà

Proprietà Guid che rappresenta il pulsante dello stilo.

Esempio

Di seguito viene verificato se l'utente ha premuto il pulsante della canna su uno stilo.

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

Commenti

Il valore di questa proprietà è garantito che sia univoco tra i pulsanti dello stilo nel sistema.

Si applica a