summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/ITemplatedItemsList.cs
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-06-17 03:10:18 -0700
committerRui Marinho <me@ruimarinho.net>2016-06-17 11:10:18 +0100
commit925fc0aa588a060eb23fa16c1d225dd030012c23 (patch)
tree83676c25c29d97d9250516b217020ba85425796d /Xamarin.Forms.Core/ITemplatedItemsList.cs
parentd44396a4534b1e2bc81143c809e4adaee656ab15 (diff)
downloadxamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.gz
xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.bz2
xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.zip
Prep Cell & friends for removal of InternalsVisibleTo (#142)
* Prep Cell & friends for removal of InternalsVisibleTo Includes: - Cell - EntryCell - ListView - MenuItem - TableView - ViewCell - Toolbar Moved extensions to Internal & removed TPH * Update docs * [Controls] Ignore Issue2411 on iOS <9 * [Controls] Formatting for Issue2411
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);
+ }
+}