Archived
1
0
This repository has been archived on 2026-04-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Michael Gordeev 787a6e9f48 Refactored core
UI navigation framework

Related Work Items: #408, #414, #416
2020-06-15 15:46:38 +03:00

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();
}
}