public static async Task MoveCurrentPageIndex(this IPaginatorController pie, int offset) => await pie.SetCurrentPageIndex((await pie.GetPageIndex()) + offset);
public static Task SetFocusPageAt(this IPaginatorController pie, int index) => pie.SetFocusPage(pie[index.NormalizeIndex(pie.Count)]);
public static Task MovePagedDataSetOffset(this IPaginatorController pie, IPagedDataSet pd, int offset) { var index = pie.IndexOf(pd); return(pie.MovePagedDataSet(pd, index != -1 ? index + offset : offset)); }
public static async Task SetFocusPageAtOffset(this IPaginatorController pie, int offset) { var ci = pie.IndexOf(await pie.GetCurrentFocusPage()); await(ci != -1 ? pie.SetFocusPageAt(ci + offset) : pie.SetFocusPageAt(offset)); }