New to Telerik UI for .NET MAUIStart a free 30-day trial

Defines the contract for controls that support loading items on demand. This interface provides functionality for loading data incrementally as needed, with support for cancellation and status tracking.

Definition

Namespace:Telerik.Maui

Assembly:Telerik.Maui.Core.dll

Syntax:

C#
public interface ISupportLoadOnDemand

Derived Classes: LoadOnDemandCollection<T>

Properties

Gets a value indicating whether there are more items available to be loaded. When false, no further load-on-demand operations will be triggered.

C#
bool HasMoreItems { get; }
Property Value:

true if more items are available for loading; otherwise, false.

Gets a value indicating whether a load-on-demand operation is currently in progress.

C#
bool IsLoading { get; }
Property Value:

true if loading is currently in progress; otherwise, false.

Gets the function that performs the actual load-on-demand operation. This function accepts a CancellationToken and returns an IEnumerable of items to be loaded.

C#
Func<CancellationToken, IEnumerable> LoadOnDemandAction { get; }
Property Value:

A function that takes a CancellationToken and returns an IEnumerable of loaded items.

Methods

Initiates a load-on-demand operation to load additional items. This method triggers the loading process using the configured LoadOnDemandAction.

C#
void LoadItemsOnDemand()

Events

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

C#
event EventHandler<EventArgs> LoadingOnDemandCanceled

Occurs when the load-on-demand operation has finished, either successfully or with an error.

C#
event EventHandler<EventArgs> LoadingOnDemandFinished

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

C#
event EventHandler<EventArgs> LoadingOnDemandStarted