IChildIndexProvider Interface

Child's index and total count information provider used by list-controls (ListBox, StackPanel, etc.)

Definition

Namespace: Avalonia.LogicalTree
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public interface IChildIndexProvider

Remarks

Used by nth-child and nth-last-child selectors.

Methods

GetChildIndex(ILogical) Gets child's actual index in order of the original source.
TryGetTotalCount(Int32) Total children count or null if source is infinite. Some Avalonia features might not work if TryGetTotalCount(Int32) returns false, for instance: nth-last-child selector.

Events

ChildIndexChanged Notifies subscriber when a child's index was changed.

See Also