summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/ITemplatedItemsList.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/ITemplatedItemsList.cs')
-rw-r--r--Xamarin.Forms.Core/ITemplatedItemsList.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/ITemplatedItemsList.cs b/Xamarin.Forms.Core/ITemplatedItemsList.cs
new file mode 100644
index 00000000..ae979d71
--- /dev/null
+++ b/Xamarin.Forms.Core/ITemplatedItemsList.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Collections;
+
+namespace Xamarin.Forms
+{
+ public interface ITemplatedItemsList<TItem> : IReadOnlyList<TItem>, INotifyCollectionChanged where TItem : BindableObject
+ {
+ event NotifyCollectionChangedEventHandler GroupedCollectionChanged;
+ event PropertyChangedEventHandler PropertyChanged;
+
+ object BindingContext { get; }
+ string Name { get; set; }
+ TItem HeaderContent { get; }
+ IEnumerable ItemsSource { get; }
+ IReadOnlyList<string> ShortNames { get; }
+
+ int GetGlobalIndexForGroup(ITemplatedItemsList<TItem> group);
+ int GetGlobalIndexOfItem(object item);
+ ITemplatedItemsList<TItem> GetGroup(int index);
+ Tuple<int, int> GetGroupAndIndexOfItem(object item);
+ Tuple<int, int> GetGroupAndIndexOfItem(object group, object item);
+ int GetGroupIndexFromGlobal(int globalIndex, out int leftOver);
+ int IndexOf(TItem item);
+ TItem UpdateContent(TItem content, int index);
+ TItem UpdateHeader(TItem content, int groupIndex);
+ }
+}