當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。