ItemsSourceViewGetOrCreateT(IEnumerableT) Method

Gets or creates an ItemsSourceViewT for the specified enumerable.

Definition

Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
public static ItemsSourceView<T> GetOrCreate<T>(
	IEnumerable<T>? items
)

Parameters

items  IEnumerableT
The enumerable.

Type Parameters

T

Return Value

ItemsSourceViewT

Remarks

This method handles the following three cases: - If items is null, returns Empty - If items is an ItemsSourceView returns the existing ItemsSourceView - Otherwise creates a new ItemsSourceView

See Also