787a6e9f48
UI navigation framework Related Work Items: #408, #414, #416
19 lines
605 B
C#
19 lines
605 B
C#
using System.Collections.ObjectModel;
|
|
using System.Runtime.InteropServices.WindowsRuntime;
|
|
using System.Threading.Tasks;
|
|
using Windows.Foundation;
|
|
using Windows.UI.Xaml.Data;
|
|
|
|
namespace FoxTube.Models.Collections
|
|
{
|
|
public abstract class ViewCollection<T> : ObservableCollection<T>, ISupportIncrementalLoading
|
|
{
|
|
public int ItemsPerRequest { get; set; } = 25;
|
|
public bool HasMoreItems { get; protected set; } = true;
|
|
|
|
public IAsyncOperation<LoadMoreItemsResult> LoadMoreItemsAsync(uint count) =>
|
|
AsyncInfo.Run((c) => LoadItems());
|
|
|
|
public abstract Task<LoadMoreItemsResult> LoadItems();
|
|
}
|
|
} |