Xamarin Forms with Prism:从堆栈中删除页面 [英] Xamarin Forms with Prism: Remove a page from the stack
本文介绍了Xamarin Forms with Prism:从堆栈中删除页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我从A页导航到B页时,我需要删除A页.
When I navigate from page A to page B, I need to remove page A.
如何使用Xamarin Forms中的Prism导航服务来做到这一点?
How can I do this with Prism's navigation service in Xamarin Forms?
推荐答案
另一种方法是让页面实现INavigationAware
,并在OnNavigatedFrom
中调用Navigatin.RemovePage(this)
.
Another approach would be to have your page implement INavigationAware
and in the OnNavigatedFrom
, call Navigatin.RemovePage(this)
.
这篇关于Xamarin Forms with Prism:从堆栈中删除页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文