当前位置: 首页>>代码示例>>C#>>正文


C# NavigationPage类代码示例

本文整理汇总了C#中NavigationPage的典型用法代码示例。如果您正苦于以下问题:C# NavigationPage类的具体用法?C# NavigationPage怎么用?C# NavigationPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


NavigationPage类属于命名空间,在下文中一共展示了NavigationPage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: App

		public App ()
		{
			// The root page of your application
//			MainPage = new GridViewOptions ();
//			MainPage = new GridViewPerformance2 ();
			MainPage = new NavigationPage (new SampleMenu ());
		}
开发者ID:DevinvN,项目名称:TwinTechsFormsLib,代码行数:7,代码来源:TwinTechsFormsExample.cs

示例2: CreateMenuPage

		protected void CreateMenuPage(string menuPageTitle)
		{
			var _menuPage = new ContentPage ();
			_menuPage.Title = menuPageTitle;
			var listView = new ListView();

			listView.ItemsSource = new string[] { "Contacts", "Quotes", "Modal Demo" };

			listView.ItemSelected += async (sender, args) =>
			{

				switch ((string)args.SelectedItem) {
				case "Contacts":
					_tabbedNavigationPage.CurrentPage = _contactsPage;
					break;
				case "Quotes":
					_tabbedNavigationPage.CurrentPage = _quotesPage;
					break;
				case "Modal Demo":
                    var modalPage = FreshPageModelResolver.ResolvePageModel<ModalPageModel>();
					await PushPage(modalPage, null, true);
					break;
				default:
				break;
				}

				IsPresented = false;
			};

			_menuPage.Content = listView;

			Master = new NavigationPage(_menuPage) { Title = "Menu" };
		}
开发者ID:gaoxl,项目名称:FreshMvvm,代码行数:33,代码来源:CustomImplementedNav.cs

示例3: App

		public App ()
		{
			NavigationPage nav = new NavigationPage ();
			// The root page of your application
			MainPage = nav;
			nav.PushAsync (new HomeCode ());
		}
开发者ID:RickySan65,项目名称:xamarin-forms-samples,代码行数:7,代码来源:twoWayBinding.cs

示例4: App

 public App()
 {
     // The root page of your application
     MessagingCenter.Subscribe<Zombie>(this, "NavigateToZombie", NavigateToZombie);
     rootNavigationPage = new NavigationPage(new HomeView());
     MainPage = rootNavigationPage;
 }
开发者ID:tmyers5,项目名称:XamarinFormsWorkshop,代码行数:7,代码来源:App.cs

示例5: MainMenu

        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;
        }
开发者ID:Railgun-it,项目名称:autoresolve-app,代码行数:31,代码来源:MainMenu.cs

示例6: App

        public App()
        {
            // Ensure link to Toolkit library.
            Color color = Xamarin.FormsBook.Toolkit.NamedColor.AliceBlue;

            MainPage = new NavigationPage(new ViewGalleryTypePage());
        }
开发者ID:jenart,项目名称:xamarin-forms-book-preview-2,代码行数:7,代码来源:App.cs

示例7: ConfigureApplication

        protected override void ConfigureApplication(IContainer container)
        {

            var viewFactory = container.Resolve<IViewFactory>();
            var txt = DependencyService.Get<IServicioFicheros>().RecuperarTexto(Cadenas.FicheroSettings);
            if (String.IsNullOrEmpty(txt))
            {
                var main = viewFactory.Resolve<LoginViewModel>(viewModel => {
                    viewModel.Titulo = "Login";
                });
                var np = new NavigationPage(main);
                _application.MainPage = np;
            }
            else
            {
                var data=JsonConvert.DeserializeObject<UsuarioModel>(txt);
                Session.User = data;
                var main = viewFactory.Resolve<LoginViewModel>(viewModel => {
                    viewModel.Titulo = "Login";
                });
                var np = new NavigationPage(main);
                _application.MainPage = np;
            }


            
            
        }
开发者ID:M1r3l,项目名称:RedSocialXamarin,代码行数:28,代码来源:StartUp.cs

示例8: App

 public App()
 {
     LoginView loginVew = new LoginView();
     loginVew.BindingContext = Container.Instance.Value.Get<LoginViewModel>();
     // The root page of your application
     MainPage = new NavigationPage(loginVew);
 }
开发者ID:juancuellor,项目名称:DotnetConference2016,代码行数:7,代码来源:App.cs

示例9: changeVisiblePage

		public void changeVisiblePage(ContentPage page)
		{
			NavigationPage navPage = new NavigationPage(page);
			navPage.BarBackgroundColor = Theme.getBackgroundColor ();
			navPage.BarTextColor = Theme.getTextColor();
			App.Current.MainPage = navPage;
		}
开发者ID:bsd5129,项目名称:LionHub,代码行数:7,代码来源:TabMenu.xaml.cs

示例10: App

        public App()
        {
            Translation.SetLocale ();

            var netLanguage = DependencyService.Get<ILocale>().GetCurrent();
            AppResources.Culture = new CultureInfo (netLanguage);

            Database = new MediandoDatabase ();
            //SyncData (Database);
            Device.OnPlatform(
                iOS: () => {
                    var homePage = new StartView ();
                    MainPage = homePage;
                },
                Android:() => {
                    var homePage = new NavigationPage (new StartView ()) {
                        BarBackgroundColor = Color.Black,
                        BarTextColor = Color.White,
                    };
                    MainPage = homePage;
                },
                WinPhone:()=>{
                    var homePage = new StartView ();
                    MainPage = homePage;
                }
            );

            App.AppSelected = ApplicationID.Default;
        }
开发者ID:CorningWebServices,项目名称:SolutionsKiosk,代码行数:29,代码来源:App.cs

示例11: App

 public App()
 {
     // Force a language change (for testing purposes)
     language.ChangeLanguage(textLanguage.Portuguese);
     // Set the main page of the application
     MainPage = new NavigationPage(new NavPage());
 }
开发者ID:yagoocarvalho,项目名称:NotifiqueMe,代码行数:7,代码来源:App.cs

示例12: RootPage

        /// <summary>
        /// Create the Root Page
        /// Define master and Detail as wenn as the default Detail page
        /// </summary>
        public RootPage()
        {
            var menuPage = new MenuPage ();
            // The effective navigation gets assigned
            menuPage.Menu.ItemSelected += (sender, e) => {
                // Before Navigating, recolor the cell
                if (menuPage.Menu.selected != null) {
                    menuPage.Menu.selected.SetColors (true);
                }

                // Select new
                menuPage.Menu.selected = (menuPage.Menu.SelectedItem as NavMenuItem);
                menuPage.Menu.selected.SetColors (false);

                NavigateTo (e.SelectedItem as NavMenuItem);
            };

            Master = menuPage;
            // Set default Detail page
            if (Device.OS == TargetPlatform.Android)
            {
                Detail = new NavigationPage(new pages.WelcomePage()) { BarBackgroundColor = Color.FromHex("FF4F45") };
            }
            else
            {
                Detail = new NavigationPage(new pages.WelcomePage());
            }
        }
开发者ID:auxua,项目名称:Qurvey,代码行数:32,代码来源:RootPage.cs

示例13: App

		public App ()
		{	
			MainPage = new NavigationPage(new RestaurantList (restaurants));

			MessagingCenter.Subscribe<RestaurantGuide.App, string> (this, "show", async (sender, arg) => {
				// do something whenever the "Hi" message is sent
				Debug.WriteLine("Search argument: " + arg);

				var restaurant = from r in restaurants
						where r.Name == arg
						select r;

				// set initial state
				await MainPage.Navigation.PopToRootAsync ();

				// load screen

				var rPage = new RestaurantDetail ();
				// set BindingContext
				rPage.BindingContext = restaurant.FirstOrDefault();

				// display screen
				await MainPage.Navigation.PushAsync (rPage);
			});
		}
开发者ID:ZaK14120,项目名称:xamarin-forms-samples,代码行数:25,代码来源:App.cs

示例14: App

        public App()
        {
            InitializeComponent();

            RootPage = new NavigationPage(new Views.Landing { BindingContext = new ViewModels.Landing() });
            MainPage = RootPage;
        }
开发者ID:rockfordlhotka,项目名称:MobileKidsIdApp,代码行数:7,代码来源:App.xaml.cs

示例15: App

 public App()
 {
     // The root page of your application
     var navPage = new NavigationPage(new MenuView());
     navPage.BarTextColor = Color.White;
     MainPage = navPage;
 }
开发者ID:jeffbmiller,项目名称:MosquitoTrapCount,代码行数:7,代码来源:MosquitoTrapCount.cs


注:本文中的NavigationPage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。