Skip to main content

ItemsSourceView Class

Definition​

Assembly:Avalonia.Controls
Package:Avalonia

Represents a standardized view of the supported interactions between an items collection and an items control.

public class ItemsSourceView

Inheritance: object -> ItemsSourceView

Implements: ICollectionChangedListener, IEnumerable<object>, IReadOnlyCollection<object>, IReadOnlyList<object>, ICollection, IEnumerable, IList, INotifyCollectionChanged

Methods​

NameDescription
ContainsNo summary available.
GetAtRetrieves the item at the specified index.
GetEnumeratorNo summary available.
GetOrCreate (2 overloads)No summary available.
IndexOfNo summary available.

Contains Method​

public bool Contains(object item)

Parameters​

item object

Returns​

bool

GetAt Method​

Retrieves the item at the specified index.

public object GetAt(int index)

Parameters​

index int

The index.

Returns​

object

The item.

GetEnumerator Method​

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

Returns​

System.Collections.Generic.IEnumerator<object>

GetOrCreate overloads​

GetOrCreate Method​

public Avalonia.Controls.ItemsSourceView<T><T> GetOrCreate<T>(System.Collections.Generic.IEnumerable<T> items)
Parameters​

items System.Collections.Generic.IEnumerable<T>

Type Parameters​

T

Returns​

Avalonia.Controls.ItemsSourceView<T><T>

GetOrCreate Method​

Gets or creates an Avalonia.Controls.ItemsSourceView for the specified enumerable.

public Avalonia.Controls.ItemsSourceView<T><T> GetOrCreate<T>(System.Collections.IEnumerable items)
Parameters​

items System.Collections.IEnumerable

The enumerable.

Returns​

Avalonia.Controls.ItemsSourceView

Remarks​

This method handles the following three cases:

IndexOf Method​

public int IndexOf(object item)

Parameters​

item object

Returns​

int

Properties​

NameDescription
CountGets the number of items in the collection.
EmptyGets an empty Avalonia.Controls.ItemsSourceView
ItemNo summary available.
SourceGets the source collection.

Count Property​

Gets the number of items in the collection.

public int Count { get; set; }

Empty Property​

Gets an empty Avalonia.Controls.ItemsSourceView

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

Item Property​

public object Item { get; set; }

Source Property​

Gets the source collection.

public System.Collections.IList Source { 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