Skip to main content

IScrollAnchorProvider Interface

Definition

Assembly:Avalonia.Controls
Package:Avalonia

Specifies a contract for a scrolling control that supports scroll anchoring.

public interface IScrollAnchorProvider

Methods

NameDescription
RegisterAnchorCandidateRegisters a control as a potential scroll anchor candidate.
UnregisterAnchorCandidateUnregisters a control as a potential scroll anchor candidate.

RegisterAnchorCandidate Method

Registers a control as a potential scroll anchor candidate.

public void RegisterAnchorCandidate(Avalonia.Controls.Control element)

Parameters

element Avalonia.Controls.Control

A control within the subtree of the Avalonia.Controls.IScrollAnchorProvider.

UnregisterAnchorCandidate Method

Unregisters a control as a potential scroll anchor candidate.

public void UnregisterAnchorCandidate(Avalonia.Controls.Control element)

Parameters

element Avalonia.Controls.Control

A control within the subtree of the Avalonia.Controls.IScrollAnchorProvider.

Properties

NameDescription
CurrentAnchorThe currently chosen anchor element to use for scroll anchoring.

CurrentAnchor Property

The currently chosen anchor element to use for scroll anchoring.

public Avalonia.Controls.Control CurrentAnchor { get; set; }