StylusButton.Guid Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the Guid that represents the stylus button.

Namespace:   System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

public Guid Guid { get; }

Property Value

Type: System.Guid

The Guid property that represents the stylus button.

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

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

.NET Framework
Available since 3.0
Return to top