StylusButton StylusButton StylusButton StylusButton Class


Represents a button on a stylus.

public ref class StylusButton
public class StylusButton
type StylusButton = class
Public Class StylusButton


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


Guid Guid Guid Guid

Gets the Guid that represents the stylus button.

Name Name Name Name

Gets the name of the stylus button.

StylusButtonState StylusButtonState StylusButtonState StylusButtonState

Gets the state of the stylus button.

StylusDevice StylusDevice StylusDevice StylusDevice

Gets the stylus that this button belongs to.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Creates a string representation of the StylusButton.

Applies to