IPointer Interface
Definition
Identifies specific pointer generated by input device.
public interface IPointer
Remarks
Some devices, for instance, touchscreen might generate a pointer on each physical contact.
Methods
| Name | Description |
|---|---|
| Capture | Captures pointer input to the specified control. |
Capture Method
Captures pointer input to the specified control.
public void Capture(Avalonia.Input.IInputElement control)
Parameters
control Avalonia.Input.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 Avalonia.Input.IPointer.Captured property.
Properties
| Name | Description |
|---|---|
| Captured | Gets the control that is currently capturing by the pointer, if any. |
| Id | Gets a unique identifier for the input pointer. |
| IsPrimary | Gets a value that indicates whether the input is from the primary pointer when multiple pointers are registered. |
| Type | Gets the pointer device type. |
Captured Property
Gets the control that is currently capturing by the pointer, if any.
public Avalonia.Input.IInputElement Captured { get; set; }
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 Avalonia.Input.IPointer.Capture(Avalonia.Input.IInputElement) method.
Id Property
Gets a unique identifier for the input pointer.
public int Id { get; set; }
IsPrimary Property
Gets a value that indicates whether the input is from the primary pointer when multiple pointers are registered.
public bool IsPrimary { get; set; }
Type Property
Gets the pointer device type.
public Avalonia.Input.PointerType Type { get; set; }