Επεξεργασία

Κοινή χρήση μέσω


StylusButton.Guid Property

Definition

Gets the Guid that represents the stylus button.

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

Property Value

The Guid property that represents the stylus button.

Examples

The following checks whether the user pressed the barrel button on a stylus.

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

Remarks

The value of this property is guaranteed to be unique among stylus buttons on the system.

Applies to