summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/RootPages/RootNavigationManyTabbedPage.cs
blob: fdce27d101ec8866d3b1d79cff7cb8fc5dabfd67 (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
using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;

namespace Xamarin.Forms.Controls
{
	// May not behave
	// NavigationPage with multiple tabbed pages	
	public class RootNavigationManyTabbedPage : NavigationPage 
	{
		public RootNavigationManyTabbedPage (string hierarchy) 
		{
			AutomationId = hierarchy + "PageId";

			var content = new TabbedPage {
				Children = { 
					new ContentPage {
						Title = "Page 1",
						Content = new SwapHierachyStackLayout (hierarchy)
					},
					new ContentPage {
						Title = "Page 2",
						Content = new Label {
							Text = "Page 2"
						}
					},
					new ContentPage {
						Title = "Page 3",
						Content = new Label {
							Text = "Page 3"
						}
					},
					new ContentPage {
						Title = "Page 4",
						Content = new Label {
							Text = "Page 4"
						}
					},
					new ContentPage {
						Title = "Page 5",
						Content = new Label {
							Text = "Page 5"
						}
					},
					new ContentPage {
						Title = "Page 6",
						Content = new Label {
							Text = "Page 6"
						}
					}, 
					
					new ContentPage {
						Title = "Go Home",
					}, 
				}
			};
			PushAsync (content);
		}
	}	
}