diff options
author | kingces95 <kingces95@users.noreply.github.com> | 2016-04-18 11:39:23 -0700 |
---|---|---|
committer | Samantha Houts <samantha@teamredwall.com> | 2016-04-18 11:39:23 -0700 |
commit | 0d57b35f21b9499876c65c7be6d11637543605aa (patch) | |
tree | 93ac3a3b3dd699d11f6a5dd7a3864bc32b8eee8e /Xamarin.Forms.Platform.WinRT | |
parent | 8f5c5e4e06b1ec5b781a6c20d75a67c8d82234f2 (diff) | |
download | xamarin-forms-0d57b35f21b9499876c65c7be6d11637543605aa.tar.gz xamarin-forms-0d57b35f21b9499876c65c7be6d11637543605aa.tar.bz2 xamarin-forms-0d57b35f21b9499876c65c7be6d11637543605aa.zip |
CarouselView Fixes (#101)
* Fix CarouselView.Item
* CarouselView formatting
* Move ItemsView.Count to IItemsViewController
* Remove dead code: CarouselView.IndexOf
* CarouselView re-layout subviews on resize.
* Add ItemTemplate to resources.xaml on UWP
* Docs
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) |