Class LoadOnDemandCollection<T>
Represents an observable collection that supports loading items on demand.
Inheritance
Namespace: Telerik.Maui
Assembly: Telerik.Maui.Core.dll
Syntax
public class LoadOnDemandCollection<T> : ObservableCollection<T>, ISupportLoadOnDemand
Type Parameters
T
The type of items in the collection. |
Constructors
LoadOnDemandCollection(Func<CancellationToken, IEnumerable>)
Initializes a new instance of the LoadOnDemandCollection<T> class.
Declaration
public LoadOnDemandCollection(Func<CancellationToken, IEnumerable> action)
Parameters
System.Func<System.Threading.CancellationToken, System.Collections.IEnumerable>
action
The action to execute when loading items on demand. |
Properties
HasMoreItems
Gets a value indicating whether there are more items available to load.
Declaration
public bool HasMoreItems { get; }
Property Value
System.Boolean
|
Implements
IsLoading
Gets a value indicating whether the collection is currently loading items.
Declaration
public bool IsLoading { get; }
Property Value
System.Boolean
|
Implements
LoadOnDemandAction
Gets the action used to load items on demand.
Declaration
public Func<CancellationToken, IEnumerable> LoadOnDemandAction { get; }
Property Value
System.Func<System.Threading.CancellationToken, System.Collections.IEnumerable>
|
Implements
Methods
LoadItemsOnDemand()
Loads items on demand asynchronously using the configured load action.
Declaration
public void LoadItemsOnDemand()
Implements
Events
LoadingOnDemandCanceled
Occurs when the load-on-demand operation has been canceled.
Declaration
public event EventHandler<EventArgs> LoadingOnDemandCanceled
Event Type
System.EventHandler<System.EventArgs>
|
Implements
LoadingOnDemandFinished
Occurs when the load-on-demand operation has finished.
Declaration
public event EventHandler<EventArgs> LoadingOnDemandFinished
Event Type
System.EventHandler<System.EventArgs>
|
Implements
LoadingOnDemandStarted
Occurs when the load-on-demand operation has started.
Declaration
public event EventHandler<EventArgs> LoadingOnDemandStarted
Event Type
System.EventHandler<System.EventArgs>
|