Inheritance: NavigationPage
示例#1
0
        /// <summary>
        /// Wraps the ContentPage within a NavigationPage
        /// </summary>
        /// <returns>The navigation page.</returns>
        public NavigationPage WithinNavigationPage()
        {
            var nav = new ThemedNavigationPage(this);

            ApplyTheme(nav);
            return(nav);
        }
示例#2
0
        /// <summary>
        /// Kicks off the main application flow - this is the typical route taken once a user is registered
        /// </summary>
        void StartAuthenticationFlow()
        {
            //Create our entry page and add it to a NavigationPage, then apply a randomly assigned color theme
            var page    = new AthleteLeaguesPage(Instance.CurrentAthlete);
            var navPage = new ThemedNavigationPage(page);

            page.ApplyTheme(navPage);
            MainPage = navPage;

            page.EnsureUserAuthenticated();
        }
        async void OnProfileSelected()
        {
            if (App.Instance.CurrentAthlete == null || App.Instance.CurrentAthlete.Id == null)
            {
                return;
            }

            var page = new AthleteProfilePage(App.Instance.CurrentAthlete.Id);

            page.OnSave = async() => await Navigation.PopModalAsync();

            var nav = new ThemedNavigationPage(page);
            await Navigation.PushModalAsync(nav);
        }
示例#4
0
文件: App.xaml.cs 项目: xamarin/Sport
		/// <summary>
		/// Kicks off the main application flow - this is the typical route taken once a user is registered
		/// </summary>
		void StartAuthenticationFlow()
		{
			//Create our entry page and add it to a NavigationPage, then apply a randomly assigned color theme
			var page = new AthleteLeaguesPage(Instance.CurrentAthlete);
			var navPage = new ThemedNavigationPage(page);
			page.ApplyTheme(navPage);
			MainPage = navPage;

			page.EnsureUserAuthenticated();
		}