GetOrCreate<T>(IEnumerable<T>) Method
Gets or creates an ItemsSourceView(T) for the specified enumerable.
Definition
Namespace: Avalonia.Controls
Assembly: Avalonia.Controls (in Avalonia.Controls.dll)
- C#
- VB
- F#
public static ItemsSourceView<T> GetOrCreate<T>(
IEnumerable<T>? items
)
Public Shared Function GetOrCreate(Of T) (
items As IEnumerable(Of T)
) As ItemsSourceView(Of T)
static member GetOrCreate :
items : IEnumerable<'T> -> ItemsSourceView<'T>
Parameters
- IEnumerable(T)
- The enumerable.
Type Parameters
Return Value
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
Reference
ItemsSourceView Class
GetOrCreate Overload
Avalonia.Controls Namespace