本文整理汇总了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());
});
}
示例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;
}
示例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);
}
示例4: NavigateToAlbum
internal void NavigateToAlbum(INavigation navigation, Album album)
{
navigation.PushAsync(new AlbumDetailsView(new AlbumDetailsViewModel(album)));
}
示例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);
}
}
示例6: NavigateToCategory
public static async Task NavigateToCategory(SampleCategory sampleCategory, INavigation navigation){
await navigation.PushAsync( new SamplesListFromCategory( sampleCategory ) );
}
示例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;
}