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);
		}
Example #2
0
        public App()
        {
            //
            // the code (and xaml) for each page is contained in a separate folder in this project
            //

            // USE C#

            var tabsCs = new TabbedPage { Title = "Working with ListView" };
            tabsCs.Children.Add (new BasicListPage {Title="Basic", Icon = "csharp.png" });
            tabsCs.Children.Add (new UnevenRowsPage {Title="Uneven", Icon = "csharp.png" });
            tabsCs.Children.Add (new ContextActionsPage {Title="Context", Icon = "csharp.png" });
            tabsCs.Children.Add (new CustomCellPage {Title="Button", Icon = "csharp.png" });
            tabsCs.Children.Add (new HeaderFooterPage {Title="HeadFoot", Icon = "csharp.png" });

            //MainPage = tabsCs;

            // USE XAML - uncomment above or below MainPage line below to use the XAML or C# versions

            var tabsXaml = new TabbedPage ();
            //tabsXaml.Children.Add (new BasicListXaml {Title="BasicX", Icon = "xaml.png" });
            //tabsXaml.Children.Add (new UnevenRowsXaml {Title="UnevenX", Icon = "xaml.png" });
            //tabsXaml.Children.Add (new ContextActionsXaml {Title="ContextX", Icon = "xaml.png" });
            tabsXaml.Children.Add (new CustomCellXaml {Title="ButtonX", Icon = "xaml.png" });
            //tabsXaml.Children.Add (new HeaderFooterXaml {Title="HeadFootX", Icon = "xaml.png" });

            MainPage = tabsXaml;
        }
Example #3
0
		public static Page GetMainPage ()
		{	
			var tech = new FeedView () { Title = "Tech" };
			tech.ViewModel.FeedSource = "http://tech.onliner.by/feed";

			var auto = new FeedView () { Title = "Auto" };
			auto.ViewModel.FeedSource = "http://auto.onliner.by/feed";

			var people = new FeedView() { Title = "People"};
			people.ViewModel.FeedSource = "http://people.onliner.by/feed";

			var realt = new FeedView () { Title = "Realt" };
			realt.ViewModel.FeedSource = "http://realt.onliner.by/feed";
            
			var tabbedPage = new TabbedPage () {
				Children = { 
					tech,
					auto,
					people,
					realt				
				}
			};
				
			return new NavigationPage(tabbedPage);
		}
		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"
			};
		}
Example #5
0
		/// <summary>
		/// This sample includes both C# and XAML versions of the user interface.
		/// UNCOMMENT the version below that you wish to try
		/// </summary>
		public static Page GetMainPage ()
		{

			// USE C#

            var tabs = new TabbedPage { Title = "Working with ListView" };

			tabs.Children.Add (new BasicListPage {Title="Basic", Icon = "csharp.png" });

			tabs.Children.Add (new UnevenRowsPage {Title="Uneven", Icon = "csharp.png" });

			tabs.Children.Add (new CustomCellPage {Title="Button", Icon = "csharp.png" });

			return tabs;


			// USE XAML

			var tabsXaml = new TabbedPage ();

			tabsXaml.Children.Add (new BasicListXaml {Title="BasicX", Icon = "xaml.png" });

			tabsXaml.Children.Add (new UnevenRowsXaml {Title="UnevenX", Icon = "xaml.png" });

			tabsXaml.Children.Add (new CustomCellXaml {Title="ButtonX", Icon = "xaml.png" });

//			return tabsXaml;
		}
		public App ()
		{
			InitializeComponent ();

			// The Application ResourceDictionary is available in Xamarin.Forms 1.3 and later
			if (Application.Current.Resources == null) {
				Application.Current.Resources = new ResourceDictionary();
			}

			var appStyle = new Style (typeof(Label)) {
				BaseResourceKey = Device.Styles.SubtitleStyleKey,
				Setters = {
					new Setter { Property = Label.TextColorProperty, Value = Color.Green }
				}
			};
			Application.Current.Resources.Add ("AppStyle", appStyle);

			var boxStyle = new Style (typeof(BoxView)) {
				Setters = {
					new Setter { Property = BoxView.ColorProperty, Value = Color.Aqua }
				}
			};
			Application.Current.Resources.Add (boxStyle); // implicit style for ALL boxviews

			var tabs = new TabbedPage ();
			tabs.Children.Add (new StylePage {Title = "C#", Icon = "csharp.png"});
			tabs.Children.Add (new StyleXaml {Title = "Xaml", Icon = "xaml.png"});
			tabs.Children.Add (new DynamicResourceXaml {Title = "Dynamic", Icon = "xaml.png"});

			//tabs.Children.Add (new OldResourceDictionary {Title = "Old", Icon = "xaml.png"});

			MainPage = tabs;
		}
Example #7
0
        public MainMenu()
        {

            var location = DependencyService.Get<IGetLocation>();

            var tabs = new TabbedPage();

            var mapLocation = new MapLocation();
            mapLocation.Title = "Accident Test";
            mapLocation.Icon = "splash";

            var mapNav = new NavigationPage(mapLocation);
            mapNav.Title = "Accident";
            mapNav.Icon = "splash.png";
            tabs.Children.Add(mapNav);

        

          

        

            /*     // demonstrates the Geocoder class
                 tabs.Children.Add(new CustomerDataGather { Title = "Geocode", Icon = "splash.png" });

                 // opens the platform's native Map app
                 tabs.Children.Add(new CustomerDataGather { Title = "Map App", Icon = "splash.png" });

     */
            MainPage = tabs;
        }
		public App ()
		{
			var tabs = new TabbedPage ();
			tabs.Children.Add(new AlertPage { Title = "Alerts", Icon="csharp.png"});
			tabs.Children.Add(new ActionSheetPage {Title = "ActionSheets", Icon="csharp.png"});
			MainPage = tabs;
		}
Example #9
0
 public App()
 {
     // The root page of your application
     MainPage = new TabbedPage
     {
         Children = {new ProfilePage (), new ListPage (), new DatabasePage()}
     };
 }
		public App ()
		{
			var tabs = new TabbedPage ();
            tabs.Children.Add (new LoadResourceText {Title = "Resource", Icon = "txt.png" });
            tabs.Children.Add (new LoadResourceXml {Title = "Resource", Icon = "xml.png"});
            tabs.Children.Add (new SaveAndLoadText {Title = "Save/Load", Icon = "saveload.png"});
            MainPage = tabs;
		}
		protected override void OnElementChanged (ElementChangedEventArgs<TabbedPage> e)
		{
			base.OnElementChanged (e);

			if (e.NewElement != null) {
				tabbedPage = (TabbedPage)e.NewElement;
			}
		}
Example #12
0
        public MenuPage(TabbedPage parentTabPage)
        {
            _parentTabPage = parentTabPage;

            Title = "Classes";

            Init();
        }
Example #13
0
		// http://blogs.msdn.com/b/windowsazurestorage/archive/2012/06/12/introducing-table-sas-shared-access-signature-queue-sas-and-update-to-blob-sas.aspx
		// http://www.dotnetcurry.com/showarticle.aspx?ID=901

		public App ()
		{
			// The root page of your application
			var tabs = new TabbedPage ();
			tabs.Children.Add (new Teal.Blob {Title = "Blob", Icon="glyphish_56_cloud" });
			tabs.Children.Add (new Teal.Table {Title = "Table",  Icon="glyphish_33_cabinet" });
			tabs.Children.Add (new Teal.Queue {Title = "Queue", Icon="glyphish_104_index_cards"});
			MainPage = tabs;
		}
Example #14
0
        public App()
        {
			var tabs = new TabbedPage ();

			tabs.Children.Add(new LabelledSectionPage {Title = "C#" });
			tabs.Children.Add(new LabelledSectionXaml {Title = "XAML" });

			MainPage = tabs;
        }
Example #15
0
		public static Page GetMainPage ()
		{	
			var tabs = new TabbedPage ();
			tabs.Children.Add(new AlertPage { Title = "Alerts", Icon="csharp.png"});
			tabs.Children.Add(new ActionSheetPage {Title = "ActionSheets", Icon="csharp.png"});
			return tabs;

			return new ActionSheetPage();
		}
Example #16
0
 public App()
 {
     var xamlTab = new TabbedPage ();
     xamlTab.Children.Add(new MainContentPage { Title = "Main"});
     xamlTab.Children.Add(new MvvmPage {Title = "Mvvm"});
     xamlTab.Children.Add(new CustomButtonPage {Title = "Custom Button"});
     // The root page of your application
     MainPage = xamlTab;
 }
Example #17
0
        public static void ShowTabbed()
        {
            var tabbed = new TabbedPage();
            tabbed.Children.Add(new LoremIpsumView { Title = "Page 1" });
            tabbed.Children.Add(new LoremIpsumView { Title = "Page 2" });
            tabbed.Children.Add(new LoremIpsumView { Title = "Page 3" });

            Current.MainPage = CreateNavigationPage(CreateMasterDetailPage(new MenuView(), tabbed));
        }
Example #18
0
        public App()
        {
            var tp = new TabbedPage();

            tp.Children.Add (new NavigationPage (new TodoListPage ()) {Title = "C#", Icon = "csharp" } );
            tp.Children.Add (new NavigationPage (new TodoListXaml ()) {Title = "XAML", Icon = "xaml" } );

            MainPage = tp;
        }
Example #19
0
        public App()
        {
            // The root page of your application
            var tabPage = new TabbedPage();
            var menuPage = new MenuPage(tabPage);

            tabPage.Children.Add(menuPage);

            MainPage = tabPage;
        }
		public App ()
		{
			var tabs = new TabbedPage ();

			tabs.Children.Add (new FontPageCs {Title = "C#", Icon = "csharp.png" });

			tabs.Children.Add (new FontPageXaml {Title = "Xaml", Icon = "xaml.png" });

			MainPage = tabs;
		}
Example #21
0
        public App()
        {
            var tabbedPage = new TabbedPage();

            tabbedPage.Children.Add(new Page1());
            tabbedPage.Children.Add(new Page2());

            // The root page of your application
            MainPage = tabbedPage;
        }
Example #22
0
		public App ()
		{
			var tabs = new TabbedPage ();
			// Icons are only in the iOS project
			tabs.Children.Add (new NavigationPage(new ListViewPage()){Title = "ListView", Icon="glyphish_wand"});
			tabs.Children.Add (new NavigationPage(new TableViewPage()){Title = "TableView", Icon="glyphish_palm"});

			// The root page of your application
			MainPage = tabs;
		}
Example #23
0
		public static Page GetMainPage ()
		{	
			var tabs = new TabbedPage ();

			tabs.Children.Add (new FontPageCs {Title = "C#", Icon = "csharp.png" });

			tabs.Children.Add (new FontPageXaml {Title = "Xaml", Icon = "xaml.png" });

			return tabs;
		}
Example #24
0
		public App ()
		{
			var tab = new TabbedPage ();
            tab.Children.Add(new LamanGeoCoder {Title = "Kode Geo"});
            tab.Children.Add(new LamanPeta {Title = "Peta/Zoom"});
            tab.Children.Add(new LamanPetaApp {Title = "Aplikasi Lain"});
            tab.Children.Add(new LamanPin {Title = "Pin Lokasi"});

		    MainPage = tab;
		}
		public NavBarTitleTestPage ()
		{
			var navTab = new NavigationPage { Title = "Hello 1 nav"};
			navTab.PushAsync (GetPage (navTab));

			var stackPages = new StackLayout ();

			var btn3 = new Button {
				Text = "tab", Command = new Command (async () => {
					var tabbed = new TabbedPage { Title = "Main Tab" };
					tabbed.Children.Add (navTab);
					tabbed.Children.Add (GetPage (navTab));
					await Navigation.PushModalAsync (tabbed);
				})
			};

			var btn4 = new Button {
				Text = "mdp", Command = new Command (async () => {
					var newNav = new NavigationPage { Title = "Hello 1 nav", BarBackgroundColor = Color.Pink, BarTextColor = Color.Blue };
					var mdp = new MasterDetailPage ();
					await newNav.PushAsync (GetPage (newNav));
					mdp.Master = new ContentPage {
						Title = "Master", BackgroundColor = Color.Red, Content = new Button {
							Text = "new", Command = new Command (() => {
								mdp.Detail = new ContactsPage { Title = "hello 3" };
								mdp.IsPresented = false;
							})
						}
					};
					mdp.Detail = newNav;
					await Navigation.PushModalAsync (mdp);
				})
			};

			var btn5 = new Button {
				Text = "nav", Command = new Command (async () => {
					var newNav = new NavigationPage { Title = "Hello 1 nav" };
					await newNav.PushAsync (GetPage (newNav));
					await Navigation.PushModalAsync (newNav);
				})
			};

			var btn6 = new Button {
				Text = "change nav", Command = new Command (() => {
					(Parent as NavigationPage).BarBackgroundColor = Color.Blue;
					(Parent as NavigationPage).BarTextColor = Color.Pink;
				})
			};

			stackPages.Children.Add (btn3);
			stackPages.Children.Add (btn4);
			stackPages.Children.Add (btn5);
			stackPages.Children.Add (btn6);
			Content = stackPages;
		}
Example #26
0
        public static Page Fetch(Service service)
        {
            if (!Platform.HasInternetConnection())
            {
                return new ContentPage
                {
                    Content = new Label
                        {
                            Text = Localize.GetString("TelegramPleaseConnectToInternet"),
                            VerticalOptions = LayoutOptions.CenterAndExpand,
                            HorizontalOptions = LayoutOptions.CenterAndExpand,
                            XAlign = TextAlignment.Center,
                            Font = Font.SystemFontOfSize(18),
                        },
                    Title = Localize.GetString("TelegramSetupWizardTitle"),
                    Padding = 30,
                };
            }

            LoadSettingsIfNeeded();

            if (_cachedPage != null)
            {
                return _cachedPage;
            }

            var tabs = new TabbedPage();

            var code = new Code(service, tabs);
            var verify = new Verify(service, tabs, code);
            var info = new Info(service, tabs, verify);

            tabs.Children.Add(info);
            tabs.PropertyChanged += (sender, e) =>
                {
                    if (e.PropertyName == "CurrentPage")
                    {
                        var selected = tabs.CurrentPage;
                        if (selected is Info)
                        {
                            tabs.Children.Remove(verify);
                            tabs.Children.Remove(code);
                        }
                        if (selected is Verify)
                        {
                            tabs.Children.Remove(code);
                        }
                    }
                };

            tabs.Title = Localize.GetString("TelegramSetupWizardTitle");
            _cachedPage = tabs;
            return tabs;
        }
Example #27
0
		public App ()
		{
			var tabbedPage = new TabbedPage ();

			tabbedPage.Children.Add (new ViaCode ());
			tabbedPage.Children.Add (new ViaXaml ());
      tabbedPage.Children.Add(new ViaResources());
      tabbedPage.Children.Add(new Listview());

			MainPage = tabbedPage;
		}
		public App ()
		{
			_backgroundPage = new BackgroundPage ();

			var tabbedPage = new TabbedPage ();
			tabbedPage.Children.Add (_backgroundPage);
			tabbedPage.Children.Add (new LongRunningPage ());
			tabbedPage.Children.Add (new DownloadPage ());

			MainPage = tabbedPage;
		}
			public App ()
			{

				var csTab = new TabbedPage ();

				csTab.Children.Add(new DevicePage {Title = "C#", Icon="csharp.png"});
				csTab.Children.Add(new DevicePageXaml {Title = "Xaml", Icon="xaml.png"});

				MainPage = csTab;

			}
Example #30
0
        public App()
        {
            InitializeComponent();

            var tabs = new TabbedPage();

            var tab1 = new NavigationPage(new MainPage());

            tab1.Title = "Home";

            var tab2 = new NavigationPage(new RoomListPage());

            tab2.Title = "Rooms";

            tabs.Children.Add(tab1);
            tabs.Children.Add(tab2);

            //MainPage = new NavigationPage(new RoomListPage());
            MainPage = tabs;
        }
Example #31
0
        public async Task TabbedPageBasicSelectionChanged()
        {
            var firstPage = new LCPage()
            {
                Title = "First Page"
            };
            var secondPage = new LCPage()
            {
                Title = "Second Page"
            };
            var tabbedPage = new TabbedPage()
            {
                Children = { firstPage, secondPage }
            };

            tabbedPage.CurrentPage = secondPage;
            Assert.IsNotNull(firstPage.NavigatingFromArgs);
            Assert.AreEqual(firstPage, secondPage.NavigatedToArgs.PreviousPage);
            Assert.AreEqual(secondPage, firstPage.NavigatedFromArgs.DestinationPage);
        }
Example #32
0
 void TestBugzilla44596()
 {
     // verify that there is no gray screen displayed between the blue splash and red MasterDetailPage.
     SetMainPage(new Bugzilla44596SplashPage(() =>
     {
         var newTabbedPage = new TabbedPage();
         newTabbedPage.Children.Add(new ContentPage {
             BackgroundColor = Color.Red, Content = new Label {
                 Text = "yay"
             }
         });
         MainPage = new MasterDetailPage
         {
             Master = new ContentPage {
                 Title = "Master", BackgroundColor = Color.Red
             },
             Detail = newTabbedPage
         };
     }));
 }
Example #33
0
        void OnSetToBottomTabs(object sender, EventArgs e)
        {
            var bottomTabs = new TabbedPage()
            {
                Children =
                {
                    Handler.MauiContext.Services.GetRequiredService <Page>(),
                    new NavigationPage(new Pages.NavigationGallery())
                    {
                        Title = "Navigation Gallery"
                    }
                }
            };

            this.Handler?.DisconnectHandler();
            Application.Current.MainPage?.Handler?.DisconnectHandler();

            AndroidSpecific.TabbedPage.SetToolbarPlacement(bottomTabs, AndroidSpecific.ToolbarPlacement.Bottom);
            Application.Current.MainPage = bottomTabs;
        }
        public App()
        {
            InitializeComponent();

            MainPage = new NavigationPage(new MainPage());

            var tabbedPage = new TabbedPage();
            var mainPage   = new MainPage();
            var fiveBand   = new FiveBandPage();
            var sixBand    = new SixBandPage();

            mainPage.Title = "Four Band";
            fiveBand.Title = "Five Band";
            sixBand.Title  = "Six Band";

            tabbedPage.Children.Add(mainPage);
            tabbedPage.Children.Add(fiveBand);
            tabbedPage.Children.Add(sixBand);
            MainPage = tabbedPage;
        }
        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"
            };
        }
Example #36
0
        void Handle_Clicked4(object sender, System.EventArgs e)
        {
            BackgroundColor = Color.Pink;

            Detail = new TabbedPage {
                Children =
                {
                    new NavigationPage(new Page4())
                    {
                        BarBackgroundColor = Color.OrangeRed,
                        BarTextColor       = Color.White,
                        Title = "IT",
                        //BackgroundColor= Color.Yellow
                    },
                    new NavigationPage(new TurkishMapRestaurants())
                    {
                        BarBackgroundColor = Color.OrangeRed,
                        //BackgroundColor = Color.Green,
                        BarTextColor = Color.White,
                        Title        = "TUR"
                    },
                    new NavigationPage(new FrenchMapRestaurants())
                    {
                        BarBackgroundColor = Color.OrangeRed,
                        //BackgroundColor = Color.Green,
                        BarTextColor = Color.White,
                        Title        = "FR"
                    },
                    new NavigationPage(new RomanianMapRestaurants())
                    {
                        BarBackgroundColor = Color.OrangeRed,
                        //BackgroundColor = Color.Green,
                        BarTextColor = Color.White,
                        Title        = "RO",
                    },
                }
            };

            //Detail.Title = "ASDAS";
            IsPresented = false;
        }
        private async void OnSelectedProject(object sender, RowEventArgs e)
        {
            DataRow row = (gProjects.ItemsSource as DataTable).Rows[e.RowHandle];

            if (row == null)
            {
                return;
            }


            Services.SetInformation("MinYOB", row["MinYOB"]);
            Services.SetInformation("ProjectNo", row["ProjectNo"]);
            Services.SetInformation("ProjectName", row["ProjectNo"]);
            Services.SetInformation("MaxYOB", row["MaxYOB"]);
            Services.SetInformation("AcceptGender", row["AcceptGender"]);
            Services.SetInformation("MonthICMA", row["MonthICMA"]);

            Services.SetInformation("CityHandle", row["CityHandle"]);
            var homePage = new TabbedPage();

            var _RespondentProfileListPage = new RespondentProfileListPage(Services, row["ProjectID"].ToString());

            homePage.Children.Add(_RespondentProfileListPage);
            homePage.Children.Add(new QuotaControlPage(Services, row["ProjectID"].ToString()));


            homePage.CurrentPageChanged += (object obj, EventArgs evt) =>
            {
                var i = homePage.Children.IndexOf(homePage.CurrentPage);
                if (i == 0)
                {
                    (homePage.CurrentPage as RespondentProfileListPage).Process();
                }
                if (i == 1)
                {
                    (homePage.CurrentPage as QuotaControlPage).Process();
                }
            };

            Application.Current.MainPage = new NavigationPage(homePage);
        }
Example #38
0
        /// <summary>
        /// This sample includes both C# and XAML versions of the user interface.
        /// UNCOMMENT the version below that you wish to try
        /// </summary>
        public static Page GetMainPage()
        {
            // USE C#

            var tabs = new TabbedPage {
                Title = "Working with ListView"
            };

            tabs.Children.Add(new BasicListPage {
                Title = "Basic", Icon = "csharp.png"
            });

            tabs.Children.Add(new UnevenRowsPage {
                Title = "Uneven", Icon = "csharp.png"
            });

            tabs.Children.Add(new CustomCellPage {
                Title = "Button", Icon = "csharp.png"
            });

            return(tabs);


            // USE XAML

            var tabsXaml = new TabbedPage();

            tabsXaml.Children.Add(new BasicListXaml {
                Title = "BasicX", Icon = "xaml.png"
            });

            tabsXaml.Children.Add(new UnevenRowsXaml {
                Title = "UnevenX", Icon = "xaml.png"
            });

            tabsXaml.Children.Add(new CustomCellXaml {
                Title = "ButtonX", Icon = "xaml.png"
            });

//			return tabsXaml;
        }
Example #39
0
        public MenuMasterDetail()
        {
            var listView = new ListView();

            menuDataService = new MenuDataService();
            // listView.ItemsSource = menuDataService.GetAllItems();

            Master = new TabbedPage()
            {
                Children =
                {
                    new BreakfastViewPage(),
                    new LunchViewPage(),
                    new FavoritesViewPage()
                }
            };

            Master.Title = "Menu";
            Master.Icon  = "cafelogo.png";

            //listView.ItemSelected += (sender, e) =>
            //{
            //    if (e.SelectedItem != null)
            //    {
            //        Detail.BindingContext = e.SelectedItem;

            //        IsPresented = false;
            //    }
            //};

            //Master = new ContentPage
            //{
            //    Title = "Menu",
            //    Icon = "cafeLogo",
            //    Content = listView
            //};

            Detail = Master;

            Navigation.PushAsync(Master);
        }
Example #40
0
        internal void UpdateActionBar()
        {
            List <Page> relevantAncestors = AncestorPagesOfPage(_navModel.CurrentPage);

            IEnumerable <NavigationPage> navPages = relevantAncestors.OfType <NavigationPage>();

            if (navPages.Count() > 1)
            {
                throw new Exception("Android only allows one navigation page on screen at a time");
            }
            NavigationPage navPage = navPages.FirstOrDefault();

            IEnumerable <TabbedPage> tabbedPages = relevantAncestors.OfType <TabbedPage>();

            if (tabbedPages.Count() > 1)
            {
                throw new Exception("Android only allows one tabbed page on screen at a time");
            }
            TabbedPage tabbedPage = tabbedPages.FirstOrDefault();

            CurrentMasterDetailPage = relevantAncestors.OfType <MasterDetailPage>().FirstOrDefault();
            CurrentNavigationPage   = navPage;
            CurrentTabbedPage       = tabbedPage;

            if (navPage != null && navPage.CurrentPage == null)
            {
                throw new InvalidOperationException("NavigationPage must have a root Page before being used. Either call PushAsync with a valid Page, or pass a Page to the constructor before usage.");
            }

            UpdateActionBarTitle();

            if (ShouldShowActionBarTitleArea() || tabbedPage != null)
            {
                ShowActionBar();
            }
            else
            {
                HideActionBar();
            }
            UpdateMasterDetailToggle();
        }
        void LookupRelevantParents()
        {
            IEnumerable <Page> parentPages = Element.GetParentPages();

            if (_parentTabbedPage != null)
            {
                _parentTabbedPage.PropertyChanged -= MultiPagePropertyChanged;
            }
            if (_parentMasterDetailPage != null)
            {
                _parentMasterDetailPage.PropertyChanged -= MultiPagePropertyChanged;
            }

            foreach (Page parentPage in parentPages)
            {
                _parentTabbedPage       = parentPage as TabbedPage;
                _parentMasterDetailPage = parentPage as MasterDetailPage;
            }

            if (_parentTabbedPage != null)
            {
                _parentTabbedPage.PropertyChanged += MultiPagePropertyChanged;
            }
            if (_parentMasterDetailPage != null)
            {
                _parentMasterDetailPage.PropertyChanged += MultiPagePropertyChanged;
            }
#if WINDOWS_UWP
            ((ITitleProvider)this).ShowTitle = _parentTabbedPage == null && _parentMasterDetailPage == null;
#else
            if (Device.Idiom == TargetIdiom.Phone && _parentTabbedPage != null)
            {
                ((ITitleProvider)this).ShowTitle = false;
            }
            else
            {
                ((ITitleProvider)this).ShowTitle = true;
            }
#endif
            UpdateTitleOnParents();
        }
Example #42
0
        public void TrackPreConstructedTabbedPage()
        {
            var tracker = new ToolbarTracker();

            var toolbarItem1 = new ToolbarItem("Foo", "Foo.png", () => { });
            var toolbarItem2 = new ToolbarItem("Foo", "Foo.png", () => { });
            var toolbarItem3 = new ToolbarItem("Foo", "Foo.png", () => { });

            var subPage1 = new ContentPage {
                ToolbarItems = { toolbarItem1 }
            };

            var subPage2 = new ContentPage {
                ToolbarItems = { toolbarItem2, toolbarItem3 }
            };

            var tabbedpage = new TabbedPage {
                Children =
                {
                    subPage1,
                    subPage2
                }
            };

            tabbedpage.CurrentPage = subPage1;

            tracker.Target = tabbedpage;

            Assert.True(tracker.ToolbarItems.Count() == 1);
            Assert.True(tracker.ToolbarItems.First() == subPage1.ToolbarItems[0]);

            bool changed = false;

            tracker.CollectionChanged += (sender, args) => changed = true;

            tabbedpage.CurrentPage = subPage2;

            Assert.True(tracker.ToolbarItems.Count() == 2);
            Assert.True(tracker.ToolbarItems.First() == subPage2.ToolbarItems[0]);
            Assert.True(tracker.ToolbarItems.Last() == subPage2.ToolbarItems[1]);
        }
Example #43
0
        public static Page GetMainPage()
        {
            var tabs = new TabbedPage();

            // demonstrates the map control with zooming and map-types
            tabs.Children.Add(new MapPage {
                Title = "Map/Zoom", Icon = "glyphish_103_map.png"
            });

            // demonstrates the map control with zooming and map-types
            tabs.Children.Add(new PinPage {
                Title = "Pins", Icon = "glyphish_07_map_marker.png"
            });

            // demonstrates the Geocoder class
            tabs.Children.Add(new GeocoderPage {
                Title = "Geocode", Icon = "glyphish_13_target.png"
            });

            return(tabs);
        }
Example #44
0
        public App()
        {
            var tabs = new TabbedPage();

            // demonstrates an Image tap (and changing the image)
            tabs.Children.Add(new TapInsideImage {
                Title = "Image", Icon = "csharp.png"
            });

            // demonstrates adding GestureRecognizer to a Frame
            tabs.Children.Add(new TapInsideFrame {
                Title = "Frame", Icon = "csharp.png"
            });

            // demonstrates using Xaml, Command and databinding
            tabs.Children.Add(new TapInsideFrameXaml {
                Title = "In Xaml", Icon = "xaml.png"
            });

            MainPage = tabs;
        }
Example #45
0
        public App()
        {
            InitializeComponent();
            var tabbedPage = new TabbedPage();

            var listPage = new ListPage()
            {
                Title = "List"
            };

            tabbedPage.Children.Add(listPage);

            var tablePage = new TablePage()
            {
                Title = "Table"
            };

            tabbedPage.Children.Add(tablePage);

            MainPage = tabbedPage;
        }
        public TabbedPage CreateMainPageForInterpreter()
        {
            var page = new TabbedPage
            {
                Children =
                {
                    new Views.InterpreterViews.CallQueuePage(),
                    new Views.InterpreterViews.CallLogPage()
                }
            };

            if (LocalStorage.LoginResponseLS.UserInfo.IsManager)
            {
                page.Children.Add(new Views.InterpreterViews.AgenciesPage());
            }

            page.Children.Add(new ProfilePage());
            page.CurrentPage = null;
            NavigationPage.SetHasNavigationBar(page, false);
            return(page);
        }
Example #47
0
        public static TabbedPage GetCalenderTabbedPage()
        {
            var CalenderTabs = new TabbedPage()
            {
                Title = "Takvim"
            };

            CalenderTabs.Children.Add(new Calender.today()
            {
                Title = "Bugün", IconImageSource = "icon"
            });
            CalenderTabs.Children.Add(new Calender.Tomarrow()
            {
                Title = "Yarın", IconImageSource = "icon"
            });
            CalenderTabs.Children.Add(new Calender.MoreDays()
            {
                Title = "+15", IconImageSource = "icon"
            });
            return(CalenderTabs);
        }
Example #48
0
        private void PersonalSchemaPage_Clicked()
        {
            TabbedPage tabbedPage = new TabbedPage();

            tabbedPage.BarBackgroundColor = Color.Green;

            NavigationPage navigationPage;

            var conference = JsonConvert.DeserializeObject <Conference>(App.Current.Properties["conference"].ToString());

            foreach (var date in conference.Dates)
            {
                navigationPage = new NavigationPage(new PersonalSchema(date));
                navigationPage.BarBackgroundColor = Color.Green;
                navigationPage.Title = date;
                tabbedPage.Children.Add(navigationPage);
            }

            App.masterDetailPage.Detail      = tabbedPage;
            App.masterDetailPage.IsPresented = false;
        }
Example #49
0
        public App()
        {
            InitializeComponent();

            TabbedPage overallTab;

            overallTab = new TabbedPage();

            Secured = new SecuredPage();

            overallTab.Children.Add(new NavigationPage(new NoAuthPage())
            {
                Title = "No Auth"
            });
            overallTab.Children.Add(new NavigationPage(Secured)
            {
                Title = "Secured"
            });

            MainPage = overallTab;
        }
Example #50
0
        private MultiPage <Page> GetMainPage()
        {
            ISiteValidator      siteValidator  = new SiteValidator();
            ISiteValidatorAsync asyncValidator = new SiteValidatorAsync(siteValidator);

            var tabbedPage = new TabbedPage()
            {
                BarBackgroundColor = Color.FromHex("#2196F3"),
                BarTextColor       = Color.White
            };

            tabbedPage.Children.Add(new CodeBehindSyncPage(siteValidator));
            tabbedPage.Children.Add(new CodeBehindAsyncPage(asyncValidator));
            //tabbedPage.Children.Add(new CodeBehindBlockThreadPage(asyncValidator));

            PlatformHelper.SetPlatformStyling(tabbedPage);
            tabbedPage.SelectedTabColor   = Color.White;
            tabbedPage.UnselectedTabColor = Color.FromHex("#0063C0");

            return(tabbedPage);
        }
Example #51
0
		public App ()
		{
			InitializeComponent();

            var np = new NavigationPage(new NavPage1());
            var tp = new TabbedPage();
            tp.Children.Add(new TabPage1());
            tp.Children.Add(new TabPage2());
            tp.Children.Add(new TabPage3());

            var cp = new CarouselPage();
            cp.Children.Add(new TabPage1());
            cp.Children.Add(new TabPage2());
            cp.Children.Add(new TabPage3());

            var mp = new MasterDetailPage();
            mp.Master = new MenuPage();
            mp.Detail = new NavigationPage(new MainPage());

            MainPage = mp;
        }
Example #52
0
        public App()
        {
            InitializeComponent();

            var greetingPage           = new MainPage(new People());
            var greetingNavigationPage = new NavigationPage(greetingPage);

            greetingNavigationPage.Title = "People";

            var otherPage           = new OtherPage();
            var otherNavigationPage = new NavigationPage(otherPage);

            otherNavigationPage.Title = "Other";

            var tabbedPage = new TabbedPage();

            tabbedPage.Children.Add(greetingNavigationPage);
            tabbedPage.Children.Add(otherNavigationPage);

            MainPage = tabbedPage;
        }
Example #53
0
        public App()
        {
            var tabs = new TabbedPage
            {
                Title          = "My Weather",
                BindingContext = new WeatherViewModel(),
                Children       =
                {
                    new WeatherView(),
                    new ForecastView()
                }
            };



            MainPage = new NavigationPage(tabs)
            {
                BarBackgroundColor = Color.FromHex("3498db"),
                BarTextColor       = Color.White
            };
        }
        public App()
        {
            TabbedPage tp = new TabbedPage();

            tp.Children.Add(new ContentPage()
            {
                Title = "ContentPage"
            });
            tp.Children.Add(new NavigationPage()
            {
                Title = "NavigationPage"
            });
            tp.Children.Add(new CarouselPage()
            {
                Title = "CarouselPage"
            });

            // The root page of your application
            MainPage = tp;      // property
            return;
        }
Example #55
0
        public App()
        {
            InitializeComponent();

            var mainPage     = new TabbedPage();
            var sessionsPage = new NavigationPage(new SessionsPage())
            {
                Title = "Sessions"
            };
            // declare speakersPage here
            var aboutPage = new NavigationPage(new AboutPage())
            {
                Title = "About"
            };

            mainPage.Children.Add(sessionsPage);
            //add speakersPage here
            mainPage.Children.Add(aboutPage);

            MainPage = mainPage;
        }
Example #56
0
#pragma warning disable 618 // This may need to be updated to work with TabLayout/AppCompat
        ActionBar.Tab AddTab(Page page, int index)
#pragma warning restore 618
        {
            ActionBar  actionBar   = ((Activity)_context).ActionBar;
            TabbedPage currentTabs = CurrentTabbedPage;

            var atab = actionBar.NewTab();

            atab.SetText(page.Title);
            atab.TabSelected += (sender, e) =>
            {
                if (!_ignoreAndroidSelection)
                {
                    currentTabs.CurrentPage = page;
                }
            };
            actionBar.AddTab(atab, index);

            page.PropertyChanged += PagePropertyChanged;
            return(atab);
        }
Example #57
0
        public App()
        {
            Locator.CurrentMutable.RegisterLazySingleton(() => new ImgurClientService(), typeof(ImgurClientService));
            Locator.CurrentMutable.RegisterLazySingleton(() => new FlickrClientService(), typeof(FlickrClientService));

            MainPage = new TabbedPage
            {
                Title    = "Epitech Epicture",
                Children =
                {
                    new NavigationPage(new GaleryView <ImgurClientService>())
                    {
                        Title = ImgurBaseClient.ServiceName
                    },
                    new NavigationPage(new GaleryView <FlickrClientService>())
                    {
                        Title = FlickrBaseClient.ServiceName
                    }
                }
            };
        }
Example #58
0
        public App()
        {
            InitializeComponent();

            // MainPage = new XamlControlPage();
            //MainPage = new NavigationPage(new EmployeeListPage());

            //SimpleIoc.Default.Register(() => UserDialogs.Instance);
            //App.Current.MainPage = new NavigationPage(new Views.LoginPage());

            try
            {
                var tabs = new TabbedPage();

                // demonstrates the map control with zooming and map-types
                tabs.Children.Add(new MapPage {
                    Title = "Map/Zoom", Icon = "glyphish_74_location.png"
                });

                // demonstrates the map control with zooming and map-types
                tabs.Children.Add(new PinPage {
                    Title = "Pins", Icon = "glyphish_07_map_marker.png"
                });

                // demonstrates the Geocoder class
                tabs.Children.Add(new GeocoderPage {
                    Title = "Geocode", Icon = "glyphish_13_target.png"
                });

                // opens the platform's native Map app
                tabs.Children.Add(new MapAppPage {
                    Title = "Map App", Icon = "glyphish_103_map.png"
                });

                MainPage = tabs;
            }
            catch (Exception ex)
            {
            }
        }
Example #59
0
        public App()
        {
            var sqlConnection = DependencyService.Get <ISqLiteService> ().GetConnection();

            Settings = new Settings(sqlConnection);

            var mePage = new MePage {
                BindingContext = new MeViewModel(),
                Title          = "Me"
            };
            var meNavigationPage = new NavigationPage(mePage)
            {
                Title = "Me",
                Icon  = "icon_user.png"
            };

            var settingsPage = new SettingsPage {
                Title = "Settings"
            };
            var navigationSettingsPage = new NavigationPage(settingsPage)
            {
                Title = "Settings",
                Icon  = "icon_settings.png"
            };

            Navigation = navigationSettingsPage.Navigation;

            settingsPage.BindingContext = new SettingsViewModel();

            var mainPage = new TabbedPage();

            mainPage.Children.Add(meNavigationPage);
            mainPage.Children.Add(navigationSettingsPage);

            MainPage = mainPage;

            BeaconService       = DependencyService.Get <IBeaconService> ();
            NotificationService = DependencyService.Get <INotificationService> ();
            EncounterUtils      = new BeaconEventsUtils(sqlConnection, NotificationService);
        }
        public App()
        {
            var tabbedPage = new TabbedPage { Title = "Hello!" };

            tab1Page = new HelloPage ();
            tab2Page = new HelloPage ();
            tab3Page = new HelloPage ();

            tabbedPage.Children.Add(tab1Page);
            tabbedPage.Children.Add(tab2Page);
            tabbedPage.Children.Add(tab3Page);

            var navigationPage = new NavigationPage(tabbedPage);

            MessagingCenter.Subscribe<HelloPage, string> (this, "Bar bg color", (page, color) => {
                DependencyService.Get<IChangeSBColor>().ChangeStatusBarColor(color);
                navigationPage.BarBackgroundColor = Color.FromHex (color);
            });
            navigationPage.BarTextColor = Color.FromHex ("#fff");

            //			tabbedPage.CurrentPage = tab1Page;
            //			if (tabbedPage.CurrentPage == tab2Page) {
            //				navigationPage.BarBackgroundColor = Color.FromHex ("#f000");
            //			}

            MainPage = navigationPage;
        }