Skip to main content

TreeDataGridItemsSourceView<T> Class

Definition

Assembly:Avalonia.Controls.TreeDataGrid
Package:Avalonia.Controls.TreeDataGrid

A strongly-typed view over a collection for use with Avalonia.Controls.TreeDataGrid.

public class TreeDataGridItemsSourceView<T>

Inheritance: object -> TreeDataGridItemsSourceView -> TreeDataGridItemsSourceView<T>

Implements: IEnumerable<>, IReadOnlyCollection<>, IReadOnlyList<>, IEnumerable

Constructors

NameDescription
TreeDataGridItemsSourceView<T>No summary available.

TreeDataGridItemsSourceView<T> Constructor

public TreeDataGridItemsSourceView<T>(System.Collections.Generic.IEnumerable<T> source)

Parameters

source System.Collections.Generic.IEnumerable<T>

Methods

NameDescription
GetAtRetrieves the item at the specified index.
GetEnumeratorNo summary available.
GetOrCreateGets or creates a strongly-typed Avalonia.Controls.TreeDataGridItemsSourceView<T> for the specified items.
DisposeInherited from TreeDataGridItemsSourceView.
IndexFromKeyRetrieves the unique identifier (key) for the item at the specified index. Inherited from TreeDataGridItemsSourceView.
IndexOfGets the index of the specified item in the collection. Inherited from TreeDataGridItemsSourceView.
KeyFromIndexRetrieves the index of the item that has the specified unique identifier (key). Inherited from TreeDataGridItemsSourceView.

GetAt Method

Retrieves the item at the specified index.

public T GetAt(int index)

Parameters

index int

The index.

Returns

T

The item.

GetEnumerator Method

public System.Collections.Generic.IEnumerator<T> GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T>

GetOrCreate Method

Gets or creates a strongly-typed Avalonia.Controls.TreeDataGridItemsSourceView<T> for the specified items.

public Avalonia.Controls.TreeDataGridItemsSourceView<T><T> GetOrCreate(System.Collections.IEnumerable items)

Parameters

items System.Collections.IEnumerable

The items collection, or null.

Returns

Avalonia.Controls.TreeDataGridItemsSourceView<T><T>

A view wrapping the items, or Avalonia.Controls.TreeDataGridItemsSourceView<T>.Empty if items is null.

Properties

NameDescription
EmptyGets an empty Avalonia.Controls.TreeDataGridItemsSourceView
ItemNo summary available.
CountGets the number of items in the collection. Inherited from TreeDataGridItemsSourceView.
HasKeyIndexMappingGets a value that indicates whether the items source can provide a unique key for each item. Inherited from TreeDataGridItemsSourceView.
InnerGets the inner collection. Inherited from TreeDataGridItemsSourceView.

Empty Property

Gets an empty Avalonia.Controls.TreeDataGridItemsSourceView

public Avalonia.Controls.TreeDataGridItemsSourceView<T><T> Empty { get; set; }

Item Property

public T Item { get; set; }

Events

NameDescription
CollectionChangedOccurs when the collection has changed to indicate the reason for the change and which items changed. Inherited from TreeDataGridItemsSourceView.