VirtualizingLayoutContext.

GetOrCreateElementAt(int) Method

Summary

Retrieves a UIElement that represents the data item in the source found at the specified index. By default, if an element already exists, it is returned; otherwise, a new element is created.
Namespace
Avalonia.Layout
Containing Type
VirtualizingLayoutContext

Syntax

public ILayoutable GetOrCreateElementAt(int index)

Remarks

This method calls GetOrCreateElementAtCore(int, ElementRealizationOptions) with options set to None. GetElementAtCore must be implemented in a derived class.

Parameters

Name Type Description
index int The index of the data item to retrieve a UIElement for.

Return Value

Type Description
ILayoutable