diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Renderers/CarouselViewRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Android/Renderers/CarouselViewRenderer.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/CarouselViewRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/CarouselViewRenderer.cs index 0056a1f8..55d9b0df 100644 --- a/Xamarin.Forms.Platform.Android/Renderers/CarouselViewRenderer.cs +++ b/Xamarin.Forms.Platform.Android/Renderers/CarouselViewRenderer.cs @@ -521,7 +521,7 @@ namespace Xamarin.Forms.Platform.Android break; case NotifyCollectionChangedAction.Remove: - if (Element.Count == 0) + if (Controller.Count == 0) throw new InvalidOperationException("CarouselView must retain a least one item."); Adapter.NotifyItemRangeRemoved( @@ -1189,8 +1189,9 @@ namespace Xamarin.Forms.Platform.Android public override int ItemCount { - get { - return Element.Count; + get + { + return Controller.Count; } } public override int GetItemViewType(int position) |