如何一次关闭多个(所有)模态? [英] How to dismiss multiple (all) modals at once?

查看:26
本文介绍了如何一次关闭多个(所有)模态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法关闭多个模态或像这样一个一个地关闭:Navigation.ModalPopAsync()?

Is there a way to dismiss multiple modals or only one by one like this: Navigation.ModalPopAsync()?

推荐答案

对于 Modals,你必须一一做,因为它在 Modal Stack对于导航堆栈,您可以使用 Navigation.PopToRootAsync()

For Modals you have to do one by one because its on the Modal Stack For Navigation Stack you can use Navigation.PopToRootAsync()

您也可以尝试不 awaitNavigation.ModalPopAsync() 并将动画传递为 false.

Also you can try not awaitthe Navigation.ModalPopAsync() and also pass animation as false.

您可以在此论坛帖子中找到更多详细信息 - PopToRootAsync with Modal

You can find more details in this forum post- PopToRootAsync with Modal

这篇关于如何一次关闭多个(所有)模态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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