summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/RootPages/RootTabbedMDPNavigationContentPage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/RootPages/RootTabbedMDPNavigationContentPage.cs')
-rw-r--r--Xamarin.Forms.Controls/RootPages/RootTabbedMDPNavigationContentPage.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/RootPages/RootTabbedMDPNavigationContentPage.cs b/Xamarin.Forms.Controls/RootPages/RootTabbedMDPNavigationContentPage.cs
new file mode 100644
index 00000000..14bf7cf1
--- /dev/null
+++ b/Xamarin.Forms.Controls/RootPages/RootTabbedMDPNavigationContentPage.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections;
+using System.Collections.ObjectModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Xamarin.Forms.Controls
+{
+ //TabbedPage -> MasterDetailPage -> NavigationPage -> ContentPage
+ public class RootTabbedMDPNavigationContentPage : TabbedPage
+ {
+ public RootTabbedMDPNavigationContentPage (string hierarchy)
+ {
+ AutomationId = hierarchy + "PageId";
+
+ var tabOne = new MasterDetailPage {
+ Title = "Testing 123",
+ Master = new ContentPage {
+ Title = "Testing 123",
+ Content = new StackLayout {
+ Children = {
+ new Label {Text = "Master"},
+ new AbsoluteLayout {
+ BackgroundColor = Color.Red,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ HorizontalOptions = LayoutOptions.FillAndExpand
+ },
+ new Button {Text = "Button"}
+ }
+ }
+ },
+ Detail = new NavigationPage (new ContentPage {
+ Title = "Testing 123",
+ Content = new SwapHierachyStackLayout (hierarchy)
+ })
+ };
+
+ 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
+ }
+ }
+ }
+ };
+
+ Children.Add (tabOne);
+ Children.Add (tabTwo);
+ }
+ }
+} \ No newline at end of file