summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2016-04-18 18:39:23 (GMT)
committerSamantha Houts <samantha@teamredwall.com>2016-04-18 18:39:23 (GMT)
commit0d57b35f21b9499876c65c7be6d11637543605aa (patch)
tree93ac3a3b3dd699d11f6a5dd7a3864bc32b8eee8e /Xamarin.Forms.Platform.WinRT
parent8f5c5e4e06b1ec5b781a6c20d75a67c8d82234f2 (diff)
downloadxamarin-forms-0d57b35f21b9499876c65c7be6d11637543605aa.zip
xamarin-forms-0d57b35f21b9499876c65c7be6d11637543605aa.tar.gz
xamarin-forms-0d57b35f21b9499876c65c7be6d11637543605aa.tar.bz2
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.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.WinRT/CarouselViewRenderer.cs b/Xamarin.Forms.Platform.WinRT/CarouselViewRenderer.cs
index 3e1fd09..e4ff754 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)