StylusButton.Guid Propiedad

Definición

Obtiene el Guid objeto que representa el botón del lápiz óptico.

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

Valor de propiedad

Propiedad Guid que representa el botón de lápiz óptico.

Ejemplos

A continuación se comprueba si el usuario ha presionado el botón de barril en un lápiz óptico.

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

Comentarios

Se garantiza que el valor de esta propiedad sea único entre los botones de lápiz del sistema.

Se aplica a