using System; namespace Xamarin.Forms.Internals { public static class CellExtensions { public static bool GetIsGroupHeader(this TItem cell) where TView : BindableObject, ITemplatedItemsView where TItem : BindableObject { return TemplatedItemsList.GetIsGroupHeader(cell); } public static void SetIsGroupHeader(this TItem cell, bool value) where TView : BindableObject, ITemplatedItemsView where TItem : BindableObject { TemplatedItemsList.SetIsGroupHeader(cell, value); } public static TItem GetGroupHeaderContent(this TItem cell) where TView : BindableObject, ITemplatedItemsView where TItem : BindableObject { var group = TemplatedItemsList.GetGroup(cell); return group.HeaderContent; } public static int GetIndex(this TItem cell) where TView : BindableObject, ITemplatedItemsView where TItem : BindableObject { return TemplatedItemsList.GetIndex(cell); } public static ITemplatedItemsList GetGroup(this TItem cell) where TView : BindableObject, ITemplatedItemsView where TItem : BindableObject { return TemplatedItemsList.GetGroup(cell); } public static Tuple GetPath(this Cell cell) { return TableView.TableSectionModel.GetPath(cell); } } }