Table of Contents

Interface IPointer

Namespace
Avalonia.Input
Assembly
Avalonia.Base.dll

Identifies specific pointer generated by input device.

[NotClientImplementable]
public interface IPointer

Remarks

Some devices, for instance, touchscreen might generate a pointer on each physical contact.

Properties

Captured

Gets the control that is currently capturing by the pointer, if any.

IInputElement? Captured { get; }

Property Value

IInputElement

Remarks

When an element captures the pointer, it receives pointer input whether the cursor is within the control's bounds or not. To set the pointer capture, call the Capture(IInputElement?) method.

Id

Gets a unique identifier for the input pointer.

int Id { get; }

Property Value

int

IsPrimary

Gets a value that indicates whether the input is from the primary pointer when multiple pointers are registered.

bool IsPrimary { get; }

Property Value

bool

Type

Gets the pointer device type.

PointerType Type { get; }

Property Value

PointerType

Methods

Capture(IInputElement?)

Captures pointer input to the specified control.

void Capture(IInputElement? control)

Parameters

control IInputElement

The control.

Remarks

When an element captures the pointer, it receives pointer input whether the cursor is within the control's bounds or not. The current pointer capture control is exposed by the Captured property.