Class
LoadOnDemandCollection<T>

Represents an observable collection that supports loading items on demand.

Definition

Namespace:Telerik.Maui

Assembly:Telerik.Maui.Core.dll

Type Parameters:

T

The type of items in the collection.

Syntax:

cs-api-definition
public class LoadOnDemandCollection<T> : ObservableCollection<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, ISupportLoadOnDemand

Inheritance: objectCollection<T>ObservableCollection<T>LoadOnDemandCollection<T>

Derived Classes: ListViewLoadOnDemandCollection

Implements: ICollectionICollection<T>IEnumerableIEnumerable<T>IListIList<T>INotifyCollectionChangedINotifyPropertyChangedIReadOnlyCollection<T>IReadOnlyList<T>ISupportLoadOnDemand

Inherited Members ObservableCollection<T>.Move(int, int)ObservableCollection<T>.ClearItems()ObservableCollection<T>.RemoveItem(int)ObservableCollection<T>.InsertItem(int, T)ObservableCollection<T>.SetItem(int, T)ObservableCollection<T>.MoveItem(int, int)ObservableCollection<T>.OnPropertyChanged(PropertyChangedEventArgs)ObservableCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs)ObservableCollection<T>.BlockReentrancy()ObservableCollection<T>.CheckReentrancy()ObservableCollection<T>.CollectionChangedObservableCollection<T>.PropertyChangedCollection<T>.Add(T)Collection<T>.Clear()Collection<T>.CopyTo(T[], int)Collection<T>.Contains(T)Collection<T>.GetEnumerator()Collection<T>.IndexOf(T)Collection<T>.Insert(int, T)Collection<T>.Remove(T)Collection<T>.RemoveAt(int)Collection<T>.CountCollection<T>.ItemsCollection<T>.this[int]

Constructors

LoadOnDemandCollection(Func<CancellationToken, IEnumerable>)

Initializes a new instance of the LoadOnDemandCollection<T> class.

Declaration

cs-api-definition
public LoadOnDemandCollection(Func<CancellationToken, IEnumerable> action)

Parameters

action

Func<CancellationToken, IEnumerable>

The action to execute when loading items on demand.

Properties

HasMoreItems

Gets a value indicating whether there are more items available to load.

Declaration

cs-api-definition
public bool HasMoreItems { get; }

Property Value

bool

Implements ISupportLoadOnDemand.HasMoreItems

IsLoading

Gets a value indicating whether the collection is currently loading items.

Declaration

cs-api-definition
public bool IsLoading { get; }

Property Value

bool

Implements ISupportLoadOnDemand.IsLoading

LoadOnDemandAction

Gets the action used to load items on demand.

Declaration

cs-api-definition
public Func<CancellationToken, IEnumerable> LoadOnDemandAction { get; }

Property Value

Func<CancellationToken, IEnumerable>

Implements ISupportLoadOnDemand.LoadOnDemandAction

Methods

LoadItemsOnDemand()

Loads items on demand asynchronously using the configured load action.

Declaration

cs-api-definition
public void LoadItemsOnDemand()

Implements ISupportLoadOnDemand.LoadItemsOnDemand()

Events

LoadingOnDemandCanceled

Occurs when the load-on-demand operation has been canceled.

Declaration

cs-api-definition
public event EventHandler<EventArgs> LoadingOnDemandCanceled

Event Value

EventHandler<EventArgs>

Implements ISupportLoadOnDemand.LoadingOnDemandCanceled

LoadingOnDemandFinished

Occurs when the load-on-demand operation has finished.

Declaration

cs-api-definition
public event EventHandler<EventArgs> LoadingOnDemandFinished

Event Value

EventHandler<EventArgs>

Implements ISupportLoadOnDemand.LoadingOnDemandFinished

LoadingOnDemandStarted

Occurs when the load-on-demand operation has started.

Declaration

cs-api-definition
public event EventHandler<EventArgs> LoadingOnDemandStarted

Event Value

EventHandler<EventArgs>

Implements ISupportLoadOnDemand.LoadingOnDemandStarted