summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorkingces95 <kingces95@users.noreply.github.com>2016-04-18 11:39:23 -0700
committerSamantha Houts <samantha@teamredwall.com>2016-04-18 11:39:23 -0700
commit0d57b35f21b9499876c65c7be6d11637543605aa (patch)
tree93ac3a3b3dd699d11f6a5dd7a3864bc32b8eee8e /Xamarin.Forms.Controls.Issues
parent8f5c5e4e06b1ec5b781a6c20d75a67c8d82234f2 (diff)
downloadxamarin-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.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselViewGallery.cs36
1 files changed, 23 insertions, 13 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselViewGallery.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselViewGallery.cs
index 9c7d9cd5..6288caa8 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselViewGallery.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/CarouselViewGallery.cs
@@ -58,6 +58,7 @@ namespace Xamarin.Forms.Controls
return galleryPage;
}
public void Screenshot(string message) => _app.Screenshot(message);
+ public IApp App => _app;
}
public class CarouselViewGallery : IGalleryPage
@@ -256,22 +257,31 @@ namespace Xamarin.Forms.Controls
Assert.AreNotEqual(0, CarouselViewGallery.InitialItemId);
Assert.AreEqual(CarouselViewGallery.InitialItemId, carousel.ItemId);
- // programatic jump to first/last
- carousel.Last();
- carousel.First();
+ gallery.App.SetOrientationPortrait();
- // programatic step to page
- carousel.StepToLast();
- carousel.StepToFirst();
+ for (var i = 0; i < 2; i++)
+ {
+ // programatic jump to first/last
+ carousel.Last();
+ carousel.First();
+
+ // programatic step to page
+ carousel.StepToLast();
+ carousel.StepToFirst();
- // swiping
- carousel.SwipeToLast();
- carousel.SwipeNext(); // test swipe past end
- carousel.SwipeToFirst();
- carousel.SwipePrevious(); // test swipe past start
+ // swiping
+ carousel.SwipeToLast();
+ carousel.SwipeNext(); // test swipe past end
+ carousel.SwipeToFirst();
+ carousel.SwipePrevious(); // test swipe past start
- } catch (Exception e) {
- gallery.Screenshot(e.ToString());
+ gallery.App.SetOrientationLandscape();
+ }
+
+ gallery.Screenshot("End");
+ }
+ catch (Exception e) {
+ gallery.Screenshot("End");
throw e;
}
}