ItemsSourceView Class

Summary

Represents a standardized view of the supported interactions between a given ItemsSource object and an ItemsRepeater control.
Namespace
Avalonia.Controls
Interfaces
  • IDisposable
Base Types
  • INotifyCollectionChanged
graph BT Type-->Base0["INotifyCollectionChanged"] Type-.->Interface0["IDisposable"] Type["ItemsSourceView"] class Type type-node

Syntax

public class ItemsSourceView : INotifyCollectionChanged, IDisposable

Remarks

Components written to work with ItemsRepeater should consume the Items via ItemsSourceView since this provides a normalized view of the Items. That way, each component does not need to know if the source is an IEnumerable, an IList, or something else.

Constructors

Name Summary
ItemsSourceView(IEnumerable) Initializes a new instance of the ItemsSourceView class for the specified data source.

Events

Name Type Summary
CollectionChanged NotifyCollectionChangedEventHandler
Occurs when the collection has changed to indicate the reason for the change and which items changed.

Properties

Name Value Summary
Count int
Gets the number of items in the collection.
HasKeyIndexMapping bool
Gets a value that indicates whether the items source can provide a unique key for each item.

Methods

Name Value Summary
Dispose() void
GetAt(int) object
Retrieves the item at the specified index.
IndexFromKey(string) int
Retrieves the unique identifier (key) for the item at the specified index.
KeyFromIndex(int) string
Retrieves the index of the item that has the specified unique identifier (key).
OnItemsSourceChanged(NotifyCollectionChangedEventArgs) void