Skip to main content

TreeDataGridItemsSourceView Class

Definition

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

Represents a standardized view of the supported interactions between a given ItemsSource object and a Avalonia.Controls.TreeDataGrid control.

public class TreeDataGridItemsSourceView

Inheritance: object -> TreeDataGridItemsSourceView

Implements: INotifyCollectionChanged, IDisposable, x

Constructors

NameDescription
TreeDataGridItemsSourceViewInitializes a new instance of the ItemsSourceView class for the specified data source.

TreeDataGridItemsSourceView Constructor

Initializes a new instance of the ItemsSourceView class for the specified data source.

public TreeDataGridItemsSourceView(System.Collections.IEnumerable source)

Parameters

source System.Collections.IEnumerable

The data source.

Methods

NameDescription
DisposeNo summary available.
GetAtRetrieves the item at the specified index.
GetOrCreateGets or creates a Avalonia.Controls.TreeDataGridItemsSourceView for the specified items.
IndexFromKeyRetrieves the unique identifier (key) for the item at the specified index.
IndexOfGets the index of the specified item in the collection.
KeyFromIndexRetrieves the index of the item that has the specified unique identifier (key).

Dispose Method

public void Dispose()

GetAt Method

Retrieves the item at the specified index.

public object GetAt(int index)

Parameters

index int

The index.

Returns

object

The item.

GetOrCreate Method

Gets or creates a Avalonia.Controls.TreeDataGridItemsSourceView for the specified items.

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

Parameters

items System.Collections.IEnumerable

The items collection, or null.

Returns

Avalonia.Controls.TreeDataGridItemsSourceView

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

IndexFromKey Method

Retrieves the unique identifier (key) for the item at the specified index.

public int IndexFromKey(string key)

Parameters

key string

The key.

Returns

int

The index.

Remarks

TODO: Not yet implemented in Avalonia.

IndexOf Method

Gets the index of the specified item in the collection.

public int IndexOf(object item)

Parameters

item object

The item to locate.

Returns

int

The zero-based index of the item, or -1 if not found.

KeyFromIndex Method

Retrieves the index of the item that has the specified unique identifier (key).

public string KeyFromIndex(int index)

Parameters

index int

The index.

Returns

string

The key

Remarks

TODO: Not yet implemented in Avalonia.

Properties

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

Count Property

Gets the number of items in the collection.

public int Count { get; set; }

Empty Property

Gets an empty Avalonia.Controls.TreeDataGridItemsSourceView

public Avalonia.Controls.TreeDataGridItemsSourceView Empty { get; set; }

HasKeyIndexMapping Property

Gets a value that indicates whether the items source can provide a unique key for each item.

public bool HasKeyIndexMapping { get; set; }

Remarks

TODO: Not yet implemented in Avalonia.

Inner Property

Gets the inner collection.

public System.Collections.IList Inner { get; set; }

Item Property

public object Item { get; set; }

Events

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

CollectionChanged Event

Occurs when the collection has changed to indicate the reason for the change and which items changed.

public event System.Collections.Specialized.NotifyCollectionChangedEventHandler CollectionChanged