Udostępnij za pośrednictwem


PenButtonListener Class

Definition

Provides access to button action event notifications from a connected pen device.

public ref class PenButtonListener sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 655360)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PenButtonListener final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 655360)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PenButtonListener
Public NotInheritable Class PenButtonListener
Inheritance
Object Platform::Object IInspectable PenButtonListener
Attributes

Windows requirements

Device family
Windows 10, version 2004 (introduced in 10.0.19041.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v10.0)

Methods

GetDefault()

Retrieves the default listener for pen button events.

IsSupported()

Retrieves whether pen button action event notifications are currently supported.

Events

IsSupportedChanged

Occurs when the availability of pen button events changes (pen settings are changed by the user or system support changes).

TailButtonClicked

Occurs when the user presses and releases (clicks) the button on the tail end of the pen.

TailButtonDoubleClicked

Occurs when the user presses and releases (clicks) the button on the tail end of the pen twice in quick succession.

TailButtonLongPressed

Occurs when the user presses and holds the button on the tail end of the pen.

Applies to