summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/RootPages/RootTabbedNavigationContentPage.cs
blob: 3f14a07f48666346181c9857d2ab3815857e3e07 (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
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Resources;
using System.Text;
using System.Threading.Tasks;
#if HAVE_OPENTK
using OpenTK.Graphics;
using OpenTK.Graphics.ES20;
#endif

namespace Xamarin.Forms.Controls
{
	public class RootTabbedNavigationContentPage : TabbedPage
	{
		public RootTabbedNavigationContentPage (string hierarchy)
		{
			AutomationId = hierarchy + "PageId";

			var tabOne = new NavigationPage (new ContentPage {
				Title = "Nav title",
				Content = new SwapHierachyStackLayout (hierarchy)
			}) { Title = "Tab 123", };

			var tabTwo = new ContentPage {
				Title = "Testing 345",
				Content = new StackLayout {
					Children = {
						new Label { Text = "Hello" },
						new AbsoluteLayout {
							BackgroundColor = Color.Red,
							VerticalOptions = LayoutOptions.FillAndExpand,
							HorizontalOptions = LayoutOptions.FillAndExpand
						},
						new Button { Text = "Button" },
					}
				}
			};

			Children.Add (tabOne);
			Children.Add (tabTwo);
		}
	}
}