blob: 096b776c1f03a18c33a6c739ac09656da7a6c590 (
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
|
using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
namespace Xamarin.Forms.Controls
{
// MasterDetailPage -> NavigationPage -> TabbedPage -> ContentPage
public class RootMDPNavigationTabbedContentPage : MasterDetailPage {
public RootMDPNavigationTabbedContentPage (string hierarchy)
{
AutomationId = hierarchy + "PageId";
var tabbedPage = new TabbedPage ();
var firstTab = new ContentPage {
//BackgroundColor = Color.Yellow,
Title = "Testing 123",
Content = new SwapHierachyStackLayout (hierarchy)
};
tabbedPage.Children.Add (firstTab);
NavigationPage.SetHasNavigationBar (firstTab, false);
Detail = new NavigationPage (tabbedPage);
Master = new NavigationPage (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" }
}
}
}) {
Title = "Testing 345"
};
}
}
}
|