在xamarin.forms作品是如何做的导航? [英] How Does Navigation in xamarin.forms Works?

查看:342
本文介绍了在xamarin.forms作品是如何做的导航?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我使用我的Andr​​oid应用程序xamarin.forms,我有导航从一个网页到另一个。我的问题是,如果从一个页面导航到另一个页面将其添加到导航堆栈。例如,如果我的应用程序有导航,如第1页 - >第2页 - >第3页 - >第4页 - >第1页(它像循环)将其替换第1页当我浏览到第二次页面还是会被它添加到堆栈。任何人都可以用简单的方式有关导航解释??

As I am using xamarin.forms for my application in android which I have to navigate from one page to another. My question is, if navigating from one page to another page adds it to the navigation stack. For example, If my app has navigation such as Page1 --> Page2 --> Page3 --> Page4 --> Page1 (It behaves like cycle) will it replace Page1 when I navigate to that page on second time or will it be adding it to the stack. Can anyone explain about navigation in a simple way??

修改

我的意思替代手段,如果从浏览一个网页到另一个将其添加到堆栈中,会不会它影响应用程序的性能,如果导航继续像一个循环,并不断将其添加到堆栈??

What I mean by replace means if navigating from one page to another adds it to the stack, Won't it affect the performance of the application if the navigation continues like a loop and keeps on adding it to the stack??

请注意:我不想回去previous页面,只是想从一个导航到另一个continously

Note: I don't want to go back to previous page, Just want to navigate from one to another continously.

在此先感谢

推荐答案

使用的 this.Navigation.PopModalAsync()之前的 PushModalAsync 的伎俩我。

Using this.Navigation.PopModalAsync () before PushModalAsync did the trick for me.

this.Navigation.PopModalAsync ();

现在我的应用程序运行平稳:)

Now my application runs smoothly :)

这篇关于在xamarin.forms作品是如何做的导航?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆