diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-07-01 13:51:38 -0700 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-07-01 21:51:38 +0100 |
commit | eb84f968f2fac47c375724465854e58c85e45bee (patch) | |
tree | 64d9ded58234602c4bdea1e706db6e0f9ba90c3c /Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs | |
parent | 128796e6d0c6bc4c48ba3b6de4ca97a33d698724 (diff) | |
download | xamarin-forms-eb84f968f2fac47c375724465854e58c85e45bee.tar.gz xamarin-forms-eb84f968f2fac47c375724465854e58c85e45bee.tar.bz2 xamarin-forms-eb84f968f2fac47c375724465854e58c85e45bee.zip |
[All] Crash fixes for ListViews (#243)
* [Controls] Add repro for 42277
* [Android] No crash if GroupHeaderTemplate=null
* [Android] Fix DataTemplateSelector crash
* [Core] Expose ListProxy on TIL
* [iOS] Fix DataTemplateSelector crash
* [Win] Fix DataTemplateSelector crash
* [Docs] Update docs
* [Core] Implement ListProxy explicitly
Allows ListProxy property to stay internal.
* [Controls] Revert unnecessary change to shproj
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs index 238759e9..5483a169 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs @@ -310,7 +310,7 @@ namespace Xamarin.Forms.Platform.iOS void OnGroupedCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { - var til = (ITemplatedItemsList<Cell>)sender; + var til = (TemplatedItemsList<ItemsView<Cell>, Cell>)sender; var templatedItems = TemplatedItemsView.TemplatedItems; var groupIndex = templatedItems.IndexOf(til.HeaderContent); @@ -919,7 +919,7 @@ namespace Xamarin.Forms.Platform.iOS { var templatedItems = TemplatedItemsView.TemplatedItems; if (List.IsGroupingEnabled) - templatedItems = (ITemplatedItemsList<Cell>)((IList)templatedItems)[indexPath.Section]; + templatedItems = (TemplatedItemsList<ItemsView<Cell>, Cell>)((IList)templatedItems)[indexPath.Section]; var cell = templatedItems[indexPath.Row]; return cell; @@ -934,7 +934,7 @@ namespace Xamarin.Forms.Platform.iOS { var currentSelected = _uiTableView.IndexPathForSelectedRow; - var til = (ITemplatedItemsView<Cell>)sender; + var til = (TemplatedItemsList<ItemsView<Cell>, Cell>)sender; var groupIndex = ((IList)TemplatedItemsView.TemplatedItems).IndexOf(til); if (groupIndex == -1) { @@ -968,9 +968,9 @@ namespace Xamarin.Forms.Platform.iOS var templatedList = TemplatedItemsView.TemplatedItems; if (List.IsGroupingEnabled) - templatedList = (ITemplatedItemsList<Cell>)((IList)templatedList)[indexPath.Section]; + templatedList = (TemplatedItemsList<ItemsView<Cell>, Cell>)((IList)templatedList)[indexPath.Section]; - var item = ((ITemplatedItemsView<Cell>)templatedList).ListProxy[indexPath.Row]; + var item = templatedList.ListProxy[indexPath.Row]; itemTemplate = selector.SelectTemplate(item, List); int key; |