summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1228.cs
blob: 0ec9fe69bf41afd8c087355b458bdfdc28b4399b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;

namespace Xamarin.Forms.Controls
{
	[Preserve (AllMembers=true)]
	[Issue (IssueTracker.Github, 1228, "ScrollView not auto scrolling with Editor", PlatformAffected.iOS)]
	public class Issue1228 : ContentPage
	{
		public Issue1228 ()
		{
			var grd = new Grid ();
		
			var layout = new StackLayout ();

			var picker = new Picker { BackgroundColor = Color.Pink };
			picker.Items.Add ("A");
			picker.Items.Add ("B");
			picker.Items.Add ("C");
			picker.Items.Add ("D");
			picker.Items.Add ("E");
			layout.Children.Add (picker);

			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });

			layout.Children.Add (new SearchBar {
				BackgroundColor = Color.Gray,
				CancelButtonColor = Color.Red
			});

			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });
			layout.Children.Add (new Editor { BackgroundColor = Color.Red, VerticalOptions = LayoutOptions.End });

			layout.Children.Add (new Entry { BackgroundColor = Color.Blue });
			layout.Children.Add (new SearchBar {
				BackgroundColor = Color.Gray,
				CancelButtonColor = Color.Red
			});
			grd.Children.Add (layout);
		

			Content = new ContentView { 
				Content = new ScrollView {
					Padding = new Thickness (0, 20, 0, 0),
					Orientation = ScrollOrientation.Vertical,
					Content = grd, 
					HeightRequest = 400, 
					VerticalOptions = LayoutOptions.Start
				},
				BackgroundColor = Color.Lime,
				HeightRequest = 400

			};
		}
	}
}