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


C# INavigation.PushAsync方法代码示例

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


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

示例1: HomePageViewModel

		public HomePageViewModel (INavigation navigation)
		{
			Navigation = navigation;
			FundsTranferCommand = new Command (async()=>{
				if(Navigation!=null)
					await Navigation.PushAsync(new FundsTransferPage());
			});
		}
开发者ID:nishanil,项目名称:MobileBanking-Forms,代码行数:8,代码来源:HomePageViewModel.cs

示例2: PushAsync

        /// <summary>
        /// PUsh a page 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 PushAsync(INavigation navigation, Page page, bool animate = true)
        {
            if (navigating)
                return;

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

示例3: NavigateToDetailsView

        public async Task NavigateToDetailsView(TodoItemViewModel todo, INavigation navigation)
        {
            await todo.LoadImagesAsync(); // reload images as they download asynchronously
            var detailsView = new TodoItemDetailsView();
            detailsView.BindingContext = todo;

            await navigation.PushAsync(detailsView);
        }
开发者ID:Azure-Samples,项目名称:app-service-mobile-dotnet-todo-list-files,代码行数:8,代码来源:TodoListViewModel.cs

示例4: NavigateToAlbum

 internal void NavigateToAlbum(INavigation navigation, Album album)
 {
     navigation.PushAsync(new AlbumDetailsView(new AlbumDetailsViewModel(album)));
 }
开发者ID:fabiocav,项目名称:mvc-musicstore-client,代码行数:4,代码来源:StoreViewModel.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: NavigateToCategory

		public static async Task NavigateToCategory(SampleCategory sampleCategory, INavigation navigation){
			await navigation.PushAsync( new SamplesListFromCategory( sampleCategory ) );
		}
开发者ID:ahdproduction,项目名称:ConnectPeople,代码行数:3,代码来源:SamplesListFromCategory.xaml.cs

示例7: TryShow

        public async Task TryShow(MvxViewModelRequest request, INavigation navigation)
        {
            Page page = null;
            if (request.ViewModelType.GetTypeInfo().ImplementedInterfaces.Contains(typeof (IFeedsViewModel)))
            {
                page = new FeedsPage();
            }
            else
            {
                try
                {
                    page = MvxPresenterHelpers.CreatePage(request);
                }
                catch (Exception e)
                {
                    
                }
            }

            bool flag;
            if (page == null)
            {
                flag = false;
            }
            else
            {
                IMvxViewModel mvxViewModel = MvxPresenterHelpers.LoadViewModel(request);
                page.BindingContext = mvxViewModel;

                var busy = Binding.Create<BaseViewModel>(vm => vm.IsLoading);
                page.SetBinding(Page.IsBusyProperty, busy);

                var titleBinding = Binding.Create<BaseViewModel>(vm => vm.Title);
                page.SetBinding(Page.TitleProperty, titleBinding);

                try
                {
                    await navigation.PushAsync(page);
                }
                catch (Exception ex)
                {
                    Mvx.Error("Exception pushing {0}: {1}\n{2}", (object) page.GetType(), (object) ex.Message,
                        (object) ex.StackTrace);
                }
            }

            flag = true;
        }
开发者ID:woellij,项目名称:LokalReporterApp,代码行数:48,代码来源:MasterDetailPresenter.cs


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