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


C# INavigation.PushModalAsync方法代码示例

本文整理汇总了C#中INavigation.PushModalAsync方法的典型用法代码示例。如果您正苦于以下问题:C# INavigation.PushModalAsync方法的具体用法?C# INavigation.PushModalAsync怎么用?C# INavigation.PushModalAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在INavigation的用法示例。


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

示例1: PushModalAsync

        /// <summary>
        /// Push a page modal async
        /// </summary>
        /// <returns>awaitable task.</returns>
        /// <param name="navigation">Navigation.</param>
        /// <param name="page">Page.</param>
        /// <param name="animate">If set to <c>true</c> animate.</param>
        public static async Task PushModalAsync(INavigation navigation, Page page, bool animate = true)
        {
            if (navigating)
                return;

            navigating = true;
            await navigation.PushModalAsync(page, animate);
            navigating = false;
        }
开发者ID:RobGibbens,项目名称:app-evolve,代码行数:16,代码来源:NavigationService.cs

示例2: ShowAsync

		async public Task ShowAsync (INavigation navigation)
		{
			System.Diagnostics.Debug.WriteLine ("StateMachine.ShowAsync()");

			// push on the base nav page modally, so that the whole lot can be poped off at the end
			await navigation.PushModalAsync(_navigationPage);

			// wait till its finished, then clean it all up
			var results = await _taskCompletionSource.Task;

			await navigation.PopModalAsync ();
		}			
开发者ID:populvuh,项目名称:StateMachine,代码行数:12,代码来源:StateMachine.cs

示例3: OnStart

		protected async override void OnStart ()
		{
			Navigation = MainPage.Navigation;

			var isAuthenticated = await IsAuthenticated ();
			if (!isAuthenticated) 
			{
				await Navigation.PushModalAsync (new LoginPage ());
			}

			var service = DependencyService.Get<ILocationService> ();
			service.StartService ();
		}
开发者ID:giuunit,项目名称:toronto-party-advisor-xamarin,代码行数:13,代码来源:TorontoPartyAdvisor.cs

示例4: AcoesDePanicoViewModel

		public  AcoesDePanicoViewModel (INavigation navigation)
		{
			Navigation = navigation;
			PanicContactRp = new Repository<PanicContacts> ();

			//Prepara list dos protetores.  O protejido eh o id da tabela PanicContact
			protetores = new ObservableCollection<PanicContacts> (PanicContactRp.GetAllAsync ().
                             Result.Where (pr => pr.Id == Settings.user_Id));

			//Prepara lista dos protegidos. Mesma tabela PanicContact, filtrando agora pelo protetor
			protegidos = new ObservableCollection<PanicContacts> (PanicContactRp.GetAllAsync ().
                             Result.Where (re => re.Email == Settings.email));

			//obtem nexID para cadastro de novos protetores
			int nextIdx = 0;
			foreach (var pr in protetores) {
				Int32.TryParse (pr.Id, out nextIdx);
				if (nextIdx > nextIDProtetor)
					nextIDProtetor = nextIdx;
			}

			completaListaProtegidos ();

			protetoresListCommand = new Command (async (key) => {
				try {
					if (await CrossContacts.Current.RequestPermission ()) {
						var protetoresContactListView = new ContactListView (new ContactsListViewModel ());
						protetoresContactListView.ContactSelected += protetor_ContactSelected;
						await Navigation.PushModalAsync (new NavigationPage (protetoresContactListView));
					}
				} catch (Exception ex) {
					Debug.WriteLine ("protetoresListCommand " + ex);
					throw;
				}
			});
		}
开发者ID:RobertoOFonseca,项目名称:MySafety,代码行数:36,代码来源:AcoesDePanicoViewModel.cs

示例5: NavigateToSample

		public async Task NavigateToSample(INavigation navigation){
			SampleCoordinator.RaiseSampleSelected (this);

			if (_justNotifyNavigateIntent) {
				return;
			}
				
			if (_customNavigation != null) {
				_customNavigation (navigation);
				return;
			}

			int popCount = 0;
			int firstPageToPopIndex = 0;

			for (int i = navigation.NavigationStack.Count - 1; i >= 0; i--) {
				if (navigation.NavigationStack [i].GetType () == _pageType) {
					firstPageToPopIndex = i + 1;
					popCount = navigation.NavigationStack.Count - 1 - i;
					break;
				}
			}

			if (popCount > 0) {
				for (int i = 1; i < popCount; i++) {
					navigation.RemovePage(navigation.NavigationStack[firstPageToPopIndex]);
				}
					
				await navigation.PopAsync ();

				return;
			}

			var page = CreateContentPage ();

			if (_modal) {
				await navigation.PushModalAsync (new NavigationPage(page));
			} else {
				await navigation.PushAsync (page);
			}
		}
开发者ID:ahdproduction,项目名称:ConnectPeople,代码行数:41,代码来源:Sample.cs

示例6: Show

 public async Task Show(INavigation nav)
 {
     await nav.PushModalAsync(this);
     IsBusy = true; 
 }
开发者ID:NogginBox,项目名称:NogginAgenda,代码行数:5,代码来源:LoadingPage.xaml.cs


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