diff options
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT')
-rw-r--r-- | Xamarin.Forms.Platform.WinRT/CarouselViewRenderer.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/CarouselViewRenderer.cs b/Xamarin.Forms.Platform.WinRT/CarouselViewRenderer.cs index 3e1fd096..e4ff754c 100644 --- a/Xamarin.Forms.Platform.WinRT/CarouselViewRenderer.cs +++ b/Xamarin.Forms.Platform.WinRT/CarouselViewRenderer.cs @@ -45,7 +45,11 @@ namespace Xamarin.Forms.Platform.WinRT { if (_flipView == null) { - _flipView = new FlipView { IsSynchronizedWithCurrentItem = false, ItemTemplate = (WDataTemplate)WApp.Current.Resources["ItemTemplate"] }; + _flipView = new FlipView + { + IsSynchronizedWithCurrentItem = false, + ItemTemplate = (WDataTemplate)WApp.Current.Resources["ItemTemplate"] + }; } _flipView.ItemsSource = Element.ItemsSource; @@ -89,7 +93,7 @@ namespace Xamarin.Forms.Platform.WinRT break; case NotifyCollectionChangedAction.Remove: - if (Element.Count == 0) + if (Controller.Count == 0) throw new InvalidOperationException("CarouselView must retain a least one item."); if (e.OldStartingIndex < Element.Position) |