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


C# Forms.Page类代码示例

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


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

示例1: SetupTabbedPage

		void SetupTabbedPage()
		{
			_tabbedNavigationPage = new FreshTabbedNavigationContainer ();
			_contactsPage = _tabbedNavigationPage.AddTab<ContactListPageModel> ("Contacts", "contacts.png");
			_quotesPage = _tabbedNavigationPage.AddTab<QuoteListPageModel> ("Quotes", "document.png");
			this.Detail = _tabbedNavigationPage;
		}
开发者ID:gaoxl,项目名称:FreshMvvm,代码行数:7,代码来源:CustomImplementedNav.cs

示例2: NavigationEventArgs

		public NavigationEventArgs(Page page)
		{
			if (page == null)
				throw new ArgumentNullException("page");

			Page = page;
		}
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:7,代码来源:NavigationEventArgs.cs

示例3: CreateContainerPage

 protected virtual Page CreateContainerPage (Page page)
 {
     if (page is NavigationPage || page is MasterDetailPage || page is TabbedPage)
         return page;
     
     return new NavigationPage (page);
 }
开发者ID:xDelivered-Patrick,项目名称:FreshMvvm,代码行数:7,代码来源:FreshNavigationContainer.cs

示例4: Show

        public void Show(Page page, PopupArguments args)
        {
			args.Popup.Parent = page;

			var container = new PopupDialogContainer(args);
			container.Show();
        }
开发者ID:kiwaa,项目名称:XfPopups,代码行数:7,代码来源:PopupService.cs

示例5: CustomerDetailViewModel

        public CustomerDetailViewModel(Account account, Page currentPage)
        {
            if (account == null)
            {
                Account = new Account();
                Account.Industry = Account.IndustryTypes[0];
                Account.OpportunityStage = Account.OpportunityStages[0];

                this.Title = "New Account";
            }
            else
            {
                Account = account;
                this.Title = "Account";
            }

            _CurrentPage = currentPage;

            this.Icon = "account.png";

            _DataClient = DependencyService.Get<IDataService>();
            _GeoCodingService = DependencyService.Get<IGeoCodingService>();

            MessagingCenter.Subscribe<Account>(this, MessagingServiceConstants.ACCOUNT, (Account) =>
                {
                    IsInitialized = false;
                });
        }
开发者ID:XnainA,项目名称:app-crm,代码行数:28,代码来源:CustomerDetailViewModel.cs

示例6: App

        public App()
        {
            //var resolverContainer = new SimpleContainer();
            //resolverContainer.Register<IMediaPicker>(new MediaPicker());

            MainPage = homeView ?? (homeView = new LoginPageView());
        }
开发者ID:suvedhagurubaran,项目名称:InsideInnings,代码行数:7,代码来源:App.cs

示例7: parseFile

        private async void parseFile(Page arg1, string bglPath)
        {
         await   ParseTheBGL(bglPath);


            
        }
开发者ID:py4object,项目名称:DictXamarin,代码行数:7,代码来源:DictonaryManager.cs

示例8: _configureAlerts

 void _configureAlerts(Page rootPage)
 {
     if (AlertHandler == null)
     {
         AlertHandler = new FormsAlertHandler(rootPage);
     }
 }
开发者ID:jakkaj,项目名称:Xamling-Core,代码行数:7,代码来源:XFrameManager.cs

示例9: MailMainModel

		public MailMainModel(Page page) : base(page)
		{
			Messages = new ObservableCollection<MailViewCellModel>();
			var accountMan = new AccountManager.AccountManager();
			var account = accountMan.LoadAccount().Result;

			var json = LacunaExpanseAPIWrapper.Inbox.ViewInbox(account.SessionID);
			var apiService = new ApiService(account.Server);
			var service = new RefitApiService(apiService);
			var result = service.InboxAsync(Priority.Background, json).Result;//.ConfigureAwait (false);
			if (result != null)
			{
				foreach(var m in result.result.messages)
				{
					var model = new MailViewCellModel
					{
						BodyPreview = m.body_preview,
						From = m.from,
						MessageID = m.id,
						Subject = m.subject
					};
					Messages.Add(model);
				}
			}
			else
			{
			}
		}
开发者ID:Jazzeroki,项目名称:junk,代码行数:28,代码来源:MailMainModel.cs

示例10: typeof

        /*
        private static readonly BindableProperty SetPopoverHiddenProperty = BindableProperty.Create("SetPopoverHidden", typeof(bool), typeof(PopoverPage), false);
        private bool SetPopoverHidden
        {
            get { return (bool)GetValue(SetPopoverHiddenProperty); }
            set { SetValue(SetPopoverHiddenProperty, value); }
        }
        */
        public void Show(Page parentPage, Point point)
        {
            ParentPage = parentPage;
            ShowFromPoint = point;

            this.SetPopoverVisible = !this.SetPopoverVisible;
        }
开发者ID:Manne990,项目名称:XamTest,代码行数:15,代码来源:PopoverPage.cs

示例11: ShowAsync

        /// <summary>
        /// 
        /// Initial stack:
        /// <EmptyPage>
        /// 
        /// Home page stack:
        /// <HomePage>
        /// 
        /// Second page stack:
        /// <HomePage> <--> <BackPage> <--> <SecondPage>
        /// 
        /// Third page stack:
        /// <HomePage> <--> <BackPage> <--> <ThirdPage>
        /// 
        /// </summary>
        /// <remarks>
        /// HomePage is kept in stack, since exception is thrown (at least on WP8) 
        /// when trying to push that page again even after being removed from stack.
        /// 
        /// BackPage is inserted before every page navigated to in order to be able 
        /// to detect back navigation from software back button in Android and iOS.
        /// </remarks>
        /// <param name="nextPage">The page to navigate to.</param>
        /// <returns>A task representing the asynchronous show operation.</returns>
        internal async Task ShowAsync(Page nextPage)
        {
            var firstPage = Navigation.NavigationStack.First();
            var secondPage = Navigation.NavigationStack.LastOrDefault();

            // Here we handle initial navigation when EmptyPage is to be displayed.
            if ((Navigation.NavigationStack.Count == 1) && (firstPage == s_emptyPage))
            {
                // HomePage instance is normally set, but might not on 
                // app resume when at the end of the navigation stack.
                if (_navigationManager.NavigationStack.CurrentPage.PageName == SpecialPageNames.Home)
                {
                    _homePage = nextPage;
                }

                await Navigation.PushAsync(nextPage);

                // Make sure BackPage is inserted before last page if we should be able 
                // to navigate back, in order for software back button to be displayed.
                if (_navigationManager.NavigationStack.CanGoBack && (firstPage != s_backPage))
                {
                    Navigation.InsertPageBefore(s_backPage, CurrentPage);
                }

                // Remove first dummy page (EmpptyPage).
                Navigation.RemovePage(firstPage);
                return;
            }

            if ((nextPage == _homePage) && !_navigationManager.NavigationStack.CanGoBack)
            {
                await Navigation.PopAsync();
                return;
            }
            else
            {
                await Navigation.PushAsync(nextPage);
            }

            // Make sure BackPage is inserted before last page if we should be able 
            // to navigate back, in order for software back button to be displayed.
            if (_navigationManager.NavigationStack.CanGoBack && (!Navigation.NavigationStack.Contains(s_backPage)))
            {
                Navigation.InsertPageBefore(s_backPage, CurrentPage);
            }

            // HomePage is kept in stack, since exception is thrown (at least on WP8) when trying 
            // to push that page again (upon back navigation) even after being removed from stack.
            if ((secondPage != null) && (secondPage != s_backPage) && (secondPage != _homePage))
            {
                Navigation.RemovePage(secondPage);
            }

            // If navigation stack is empty, remove first page if it is a back 
            // page, in order for next back navigation to exit application.
            if (!_navigationManager.NavigationStack.CanGoBack && (firstPage == s_backPage))
            {
                Navigation.RemovePage(s_backPage);
            }
        }
开发者ID:deepakpal9046,项目名称:Okra.Core,代码行数:84,代码来源:NavigationView.cs

示例12: PushView

 public void PushView(BasePageModel viewModelToPush, Page pageToPush, bool model)
 {
     if (model)
         this.CurrentPage.Navigation.PushModalAsync (pageToPush);
     else
         this.CurrentPage.Navigation.PushAsync (pageToPush);
 }
开发者ID:rid00z,项目名称:JellyBeanTracker,代码行数:7,代码来源:MainContainerPage.cs

示例13: OnElementChanged

        protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
        {
            base.OnElementChanged(e);
            if (e.OldElement == null)
            {
                if (GetContainingViewCell(e.NewElement) != null)
                {
                    page = GetContainingPage(e.NewElement);
                    if (page.Parent is TabbedPage)
                    {
                        page.Disappearing += PageContainedInTabbedPageDisapearing;
                        return;
                    }

                    navigPage = GetContainingNavigationPage(page);
                    if (navigPage != null)
                    {
                        navigPage.Popped += OnPagePopped;
                        if (page is BaseContentPage)
                            (page as BaseContentPage).Disposing += OnPageDisposed;
                    }
                }
                else if ((page = GetContainingTabbedPage(e.NewElement)) != null)
                {
                    page.Disappearing += PageContainedInTabbedPageDisapearing;
                }
            }
        }
开发者ID:asthanarht,项目名称:XamarinDiscountsApp,代码行数:28,代码来源:ImageExtendedRenderer.cs

示例14: OrderDetailViewModel

 public OrderDetailViewModel(Page page)
     : base(page)
 {
     Title = title;
     OrderDetail = new ObservableCollection<OrderDetails>();
     
 }
开发者ID:ashokkumarreddy1987,项目名称:learnings,代码行数:7,代码来源:OrderDetailViewModel.cs

示例15: IniciarSesion

        private async void IniciarSesion()
        {
            var page = new Page();
            try
            {
                IsBusy = true;
                var us = await _servicio.ValidarUsuario(_login);

                if (us != null)
                {
                    await _navigator.PopToRootAsync();
                    await _navigator.PushAsync<ContactosViewModel>(viewModel =>
                    {
                        Titulo = "Inicio de sesión";
                    });
                }
                else
                {
                    var xx = ""; //para comprobar que se haga bien.
                }

                //TODO: aquí navegaríamos a la pantalla principal o daríamos error
                await page.DisplayAlert(Strings.Error, Strings.UserDoesNotExist, Strings.Ok);
            }
            catch (Exception e)
            {
                await page.DisplayAlert(Strings.Error, e.Message, Strings.Ok);
            }
            finally
            {
                IsBusy = false;
            }
        }
开发者ID:AlvaroDama,项目名称:RedSocial,代码行数:33,代码来源:LoginViewModel.cs


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