summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs52
1 files changed, 52 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs
new file mode 100644
index 00000000..64c5c8f8
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs
@@ -0,0 +1,52 @@
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using NUnit.Framework;
+using Xamarin.UITest;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Github, 968, "StackLayout does not relayout on device rotation", PlatformAffected.iOS, NavigationBehavior.PushModalAsync)]
+ public class Issue968 : TestContentPage
+ {
+ protected override void Init ()
+ {
+ Title = "Nav Bar";
+
+ var layout = new StackLayout {
+ Padding = new Thickness (20),
+ BackgroundColor = Color.Gray
+ };
+
+ layout.Children.Add (new BoxView {
+ BackgroundColor = Color.Red,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand
+ });
+
+ layout.Children.Add (new Label {
+ Text = "You should see me after rotating"
+ });
+
+ Content = layout;
+ }
+
+#if UITEST
+ [Test]
+ [Description ("Verify the layout lays out on rotations")]
+ [UiTest (typeof(StackLayout))]
+ public void Issue968TestsRotationRelayoutIssue ()
+ {
+ RunningApp.SetOrientationLandscape ();
+ RunningApp.Screenshot ("Rotated to Landscape");
+ RunningApp.WaitForElement (q => q.Marked ("You should see me after rotating"));
+ RunningApp.Screenshot ("StackLayout in Modal respects rotation");
+ RunningApp.SetOrientationPortrait ();
+ }
+#endif
+
+ }
+}