diff options
Diffstat (limited to 'Xamarin.Forms.Controls/RootPages/RootMDPNavigationTabbedContentPage.cs')
-rw-r--r-- | Xamarin.Forms.Controls/RootPages/RootMDPNavigationTabbedContentPage.cs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/RootPages/RootMDPNavigationTabbedContentPage.cs b/Xamarin.Forms.Controls/RootPages/RootMDPNavigationTabbedContentPage.cs new file mode 100644 index 00000000..096b776c --- /dev/null +++ b/Xamarin.Forms.Controls/RootPages/RootMDPNavigationTabbedContentPage.cs @@ -0,0 +1,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" + }; + } + } +} |