diff options
author | kingces95 <kingces95@users.noreply.github.com> | 2017-04-11 14:02:06 -0400 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-04-11 19:02:06 +0100 |
commit | 093a4efa2da9cb681890158ca8ee9bb6f30b0a8c (patch) | |
tree | ccc17255876e40d2c845d7b2c62dfc930156729d /Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs | |
parent | 7458ca37330f424bf7fb1447580b0fa9c34c6db4 (diff) | |
download | xamarin-forms-093a4efa2da9cb681890158ca8ee9bb6f30b0a8c.tar.gz xamarin-forms-093a4efa2da9cb681890158ca8ee9bb6f30b0a8c.tar.bz2 xamarin-forms-093a4efa2da9cb681890158ca8ee9bb6f30b0a8c.zip |
Implicit impl of controller ifaces (#807)
* Simplify ICtrl callsites
* Rebase fix
Diffstat (limited to 'Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs')
-rw-r--r-- | Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs b/Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs index 0a0a9db8..1a9cf7f0 100644 --- a/Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs +++ b/Xamarin.Forms.Platform.MacOS/Renderers/ListViewDataSource.cs @@ -18,8 +18,6 @@ namespace Xamarin.Forms.Platform.MacOS readonly NSTableView _nsTableView; protected readonly ListView List; - IListViewController Controller => List; - ITemplatedItemsView<Cell> TemplatedItemsView => List; bool _selectionFromNative; @@ -63,7 +61,7 @@ namespace Xamarin.Forms.Platform.MacOS return; _selectionFromNative = true; - Controller.NotifyRowTapped((int)indexPath.Section, (int)indexPath.Item, cell); + List.NotifyRowTapped((int)indexPath.Section, (int)indexPath.Item, cell); } @@ -158,7 +156,7 @@ namespace Xamarin.Forms.Platform.MacOS NSView nativeCell; - var cachingStrategy = Controller.CachingStrategy; + var cachingStrategy = List.CachingStrategy; if (cachingStrategy == ListViewCachingStrategy.RetainElement) { cell = GetCellForPath(indexPath, isHeader); @@ -176,10 +174,10 @@ namespace Xamarin.Forms.Platform.MacOS { var templatedList = TemplatedItemsView.TemplatedItems.GetGroup(sectionIndex); cell = (Cell)((INativeElementView)nativeCell).Element; - ICellController controller = cell; - controller.SendDisappearing(); + + cell.SendDisappearing(); templatedList.UpdateContent(cell, itemIndexInSection); - controller.SendAppearing(); + cell.SendAppearing(); } } else |