StylusButton Class

Definition

Represents a button on a stylus.

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

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

Properties

Guid

Gets the Guid that represents the stylus button.

Name

Gets the name of the stylus button.

StylusButtonState

Gets the state of the stylus button.

StylusDevice

Gets the stylus that this button belongs to.

Methods

Equals(Object)

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

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Creates a string representation of the StylusButton.

Applies to