diff options
Diffstat (limited to 'Xamarin.Forms.Controls/RootPages/RootNavigationTabbedContentPage.cs')
-rw-r--r-- | Xamarin.Forms.Controls/RootPages/RootNavigationTabbedContentPage.cs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/RootPages/RootNavigationTabbedContentPage.cs b/Xamarin.Forms.Controls/RootPages/RootNavigationTabbedContentPage.cs new file mode 100644 index 00000000..25c2987e --- /dev/null +++ b/Xamarin.Forms.Controls/RootPages/RootNavigationTabbedContentPage.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; + +namespace Xamarin.Forms.Controls +{ + // NavigationPage -> TabbedPage -> ContentPage + // Not recommended + public class RootNavigationTabbedContentPage : NavigationPage + { + public RootNavigationTabbedContentPage (string hierarchy) + { + AutomationId = hierarchy + "PageId"; + + var tabbedPage = new TabbedPage { + Children = { + new ContentPage { + Title = "Page 1", + Content = new SwapHierachyStackLayout (hierarchy) + }, + new ContentPage { + Title = "Page 2", + Content = new StackLayout { + Children = { + new Label { Text = "Page Two" }, + new BoxView { + Color = Color.Gray, + VerticalOptions = LayoutOptions.FillAndExpand, + HorizontalOptions = LayoutOptions.FillAndExpand + }, + new Button { Text = "Click me" }, + } + } + } + } + }; + + PushAsync (tabbedPage); + } + + } +}
\ No newline at end of file |