简体   繁体   English

在Xamarin Forms Prism中找不到PushPopupPageAsync

[英]PushPopupPageAsync not found in Xamarin Forms Prism

Not found PushPopupPageAsync 找不到PushPopupPageAsync

_navigationService.PushPopupPageAsync( "MyPopupPage" );

I am using Rg.Plugin.Popup along withg Prism but PushPopupPageAsync not available on INavigationService 我正在使用Rg.Plugin.Popup和prism,但PushPopupPageAsync在INavigationService上不可用

how to solve it? 怎么解决?

Are you sure that you should be calling PushPopupPageAsync ? 你确定你应该调用PushPopupPageAsync吗? Rg.Plugin.Popup extends the Navigation service with PushPopupAsync - note there is no Page in the name. Rg.Plugin.Popup扩展了导航服务PushPopupAsync -注意,在名称的页面

To be able to use PushPopupAsync you also need to have: 为了能够使用PushPopupAsync您还需要:

using Rg.Plugins.Popup.Extensions;

in the source file where you want to call PushPopupAsync 在您要调用PushPopupAsync的源文件中

Its easier to use the Prism.Plugin.Popups made by the Prism maintainer, then you can just use the standard NavigateAsync method: 它更容易使用由Prism维护者制作的Prism.Plugin.Popups ,然后你可以使用标准的NavigateAsync方法:

_navigationService.NavigateAsync("MyPopupPage")

With this, te page is pushed as a popup with Rg.Plugin.Popup. 有了这个,te页面就像Rg.Plugin.Popup的弹出窗口一样被推送。 (of course you have to target a PopupPage to make this works) (当然你必须以PopupPage为目标才能使其工作)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM